質問編集履歴
6
_
test
CHANGED
File without changes
|
test
CHANGED
@@ -31,7 +31,7 @@
|
|
31
31
|
|
32
32
|
C#
|
33
33
|
ソースコード
|
34
|
-
|
34
|
+
```
|
35
35
|
using System.Collections;
|
36
36
|
using System.Collections.Generic;
|
37
37
|
using UnityEngine;
|
5
_
test
CHANGED
File without changes
|
test
CHANGED
@@ -31,32 +31,39 @@
|
|
31
31
|
|
32
32
|
C#
|
33
33
|
ソースコード
|
34
|
+
|
34
35
|
using System.Collections;
|
35
36
|
using System.Collections.Generic;
|
36
37
|
using UnityEngine;
|
37
38
|
using UnityEngine.UI;
|
39
|
+
|
38
40
|
public class CamPOChange : MonoBehaviour
|
39
41
|
{
|
40
42
|
public Camera m_OrthographicCamera;
|
43
|
+
|
41
44
|
public Slider slider;
|
45
|
+
|
42
|
-
bool m_Condition = false;
|
46
|
+
bool m_Condition = false; //bool型の変数 初期状態の宣言
|
47
|
+
|
43
48
|
// Start is called before the first frame update
|
44
49
|
void Start()
|
45
50
|
{
|
46
51
|
m_OrthographicCamera.enabled = true;
|
52
|
+
|
47
53
|
slider = GameObject.Find("MainCameraPanel").GetComponent<Slider>();
|
48
54
|
}
|
55
|
+
|
49
56
|
// Update is called once per frame
|
50
57
|
void Update()
|
51
58
|
{
|
52
|
-
|
59
|
+
|
53
60
|
}
|
54
61
|
public void POChange()
|
55
62
|
{
|
56
|
-
m_Condition = !m_Condition;
|
63
|
+
m_Condition = !m_Condition; // !で反対の意味にするtrueならfalse 、falseであらばtrueになる
|
57
64
|
{
|
58
65
|
Debug.Log("PO");
|
59
|
-
if (m_Condition)
|
66
|
+
if (m_Condition) // m_Conditionの状態が…だったら
|
60
67
|
{
|
61
68
|
m_OrthographicCamera.enabled = true;
|
62
69
|
Debug.Log("Push");
|
@@ -67,12 +74,17 @@
|
|
67
74
|
}
|
68
75
|
}
|
69
76
|
}
|
77
|
+
|
70
|
-
public void OrthoSizeAdjust()
|
78
|
+
public void OrthoSizeAdjust()
|
71
79
|
{
|
72
80
|
GameObject mainCamera = GameObject.Find("MainCamera");
|
73
81
|
float scale = slider.value;
|
82
|
+
|
74
83
|
}
|
84
|
+
|
75
85
|
}
|
86
|
+
|
87
|
+
|
76
88
|
### 試したこと
|
77
89
|
調べてみたものの、解決に至らず苦慮しております。
|
78
90
|
解決策をご教示いただけますと幸いです。宜しくお願い致します。
|
4
再編集
test
CHANGED
File without changes
|
test
CHANGED
@@ -46,7 +46,6 @@
|
|
46
46
|
m_OrthographicCamera.enabled = true;
|
47
47
|
slider = GameObject.Find("MainCameraPanel").GetComponent<Slider>();
|
48
48
|
}
|
49
|
-
|
50
49
|
// Update is called once per frame
|
51
50
|
void Update()
|
52
51
|
{
|
@@ -68,8 +67,7 @@
|
|
68
67
|
}
|
69
68
|
}
|
70
69
|
}
|
71
|
-
|
72
|
-
|
70
|
+
public void OrthoSizeAdjust()
|
73
71
|
{
|
74
72
|
GameObject mainCamera = GameObject.Find("MainCamera");
|
75
73
|
float scale = slider.value;
|
3
再変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -38,23 +38,19 @@
|
|
38
38
|
public class CamPOChange : MonoBehaviour
|
39
39
|
{
|
40
40
|
public Camera m_OrthographicCamera;
|
41
|
-
|
42
41
|
public Slider slider;
|
43
|
-
|
44
42
|
bool m_Condition = false;
|
45
|
-
|
46
43
|
// Start is called before the first frame update
|
47
44
|
void Start()
|
48
45
|
{
|
49
46
|
m_OrthographicCamera.enabled = true;
|
50
|
-
|
51
47
|
slider = GameObject.Find("MainCameraPanel").GetComponent<Slider>();
|
52
48
|
}
|
53
49
|
|
54
50
|
// Update is called once per frame
|
55
51
|
void Update()
|
56
52
|
{
|
57
|
-
|
53
|
+
|
58
54
|
}
|
59
55
|
public void POChange()
|
60
56
|
{
|
@@ -77,13 +73,8 @@
|
|
77
73
|
{
|
78
74
|
GameObject mainCamera = GameObject.Find("MainCamera");
|
79
75
|
float scale = slider.value;
|
80
|
-
|
81
76
|
}
|
82
|
-
|
83
77
|
}
|
84
|
-
|
85
|
-
|
86
|
-
|
87
78
|
### 試したこと
|
88
79
|
調べてみたものの、解決に至らず苦慮しております。
|
89
80
|
解決策をご教示いただけますと幸いです。宜しくお願い致します。
|
2
同
test
CHANGED
File without changes
|
test
CHANGED
@@ -35,7 +35,6 @@
|
|
35
35
|
using System.Collections.Generic;
|
36
36
|
using UnityEngine;
|
37
37
|
using UnityEngine.UI;
|
38
|
-
|
39
38
|
public class CamPOChange : MonoBehaviour
|
40
39
|
{
|
41
40
|
public Camera m_OrthographicCamera;
|
1
スクリプトを編集しなおしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -36,7 +36,7 @@
|
|
36
36
|
using UnityEngine;
|
37
37
|
using UnityEngine.UI;
|
38
38
|
|
39
|
-
public class CamPOChange: MonoBehaviour
|
39
|
+
public class CamPOChange : MonoBehaviour
|
40
40
|
{
|
41
41
|
public Camera m_OrthographicCamera;
|
42
42
|
|
@@ -59,10 +59,10 @@
|
|
59
59
|
}
|
60
60
|
public void POChange()
|
61
61
|
{
|
62
|
-
m_Condition = !m_Condition;
|
62
|
+
m_Condition = !m_Condition;
|
63
63
|
{
|
64
64
|
Debug.Log("PO");
|
65
|
-
if (m_Condition)
|
65
|
+
if (m_Condition)
|
66
66
|
{
|
67
67
|
m_OrthographicCamera.enabled = true;
|
68
68
|
Debug.Log("Push");
|
@@ -78,8 +78,11 @@
|
|
78
78
|
{
|
79
79
|
GameObject mainCamera = GameObject.Find("MainCamera");
|
80
80
|
float scale = slider.value;
|
81
|
+
|
81
82
|
}
|
83
|
+
|
82
84
|
}
|
85
|
+
|
83
86
|
|
84
87
|
|
85
88
|
### 試したこと
|