質問編集履歴

2

追加説明

2020/08/08 21:49

投稿

jo1jo2jo3
jo1jo2jo3

スコア45

test CHANGED
File without changes
test CHANGED
@@ -59,3 +59,71 @@
59
59
  Game scripts or other custom code contains OnMouse_ event handlers. Presence of such handlers might impact performance on handheld devices.
60
60
 
61
61
  UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
62
+
63
+
64
+
65
+ ```using UnityEngine;
66
+
67
+
68
+
69
+ public class MovableBoxManager : MonoBehaviour {
70
+
71
+
72
+
73
+ private GameObject gameManager; //ゲームマネージャー
74
+
75
+
76
+
77
+ // Use this for initialization
78
+
79
+ void Start()
80
+
81
+ {
82
+
83
+ //ゲームマネージャーを取得
84
+
85
+ gameManager = GameObject.Find("GameManager");
86
+
87
+ }
88
+
89
+
90
+
91
+ // Update is called once per frame
92
+
93
+ void Update () {
94
+
95
+
96
+
97
+ }
98
+
99
+
100
+
101
+ //ドラッグ処理
102
+
103
+ void OnMouseDrag () {
104
+
105
+ if (gameManager.GetComponent<GameManager> ().isBallMoving == false) {
106
+
107
+ //位置を取得
108
+
109
+ float x = Input.mousePosition.x;
110
+
111
+ float y = Input.mousePosition.y;
112
+
113
+ float z = 100.0f;
114
+
115
+ //位置を変換してオブジェクトの座標に指定
116
+
117
+ transform.position = Camera.main.ScreenToWorldPoint (new Vector3 (x, y, z));
118
+
119
+ }
120
+
121
+ }
122
+
123
+ }
124
+
125
+
126
+
127
+ コード
128
+
129
+ ```

1

追記

2020/08/08 21:49

投稿

jo1jo2jo3
jo1jo2jo3

スコア45

test CHANGED
File without changes
test CHANGED
@@ -37,3 +37,25 @@
37
37
 
38
38
 
39
39
  http://smatabinfo.jp/os/android/index.html
40
+
41
+
42
+
43
+ ...............................................
44
+
45
+
46
+
47
+ 追加情報
48
+
49
+ Unity ビルド時警告が発生した為、 実機端末で確認したいと思います。
50
+
51
+ PCのタッチパネルでは動作問題ないですがandroid端末は確認できていません
52
+
53
+ でした。
54
+
55
+ Unity 警告文
56
+
57
+
58
+
59
+ Game scripts or other custom code contains OnMouse_ event handlers. Presence of such handlers might impact performance on handheld devices.
60
+
61
+ UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)