質問編集履歴
2
誤字を訂正
title
CHANGED
File without changes
|
body
CHANGED
@@ -33,11 +33,11 @@
|
|
33
33
|
obj.name = "message" + ID;
|
34
34
|
obj.transform.parent = list.transform;
|
35
35
|
|
36
|
-
GameObject messagetext =
|
36
|
+
GameObject messagetext = obj.transform.Find("messagetext").gameObject;
|
37
37
|
Text text1 = messagetext.GetComponentInChildren<Text>();
|
38
38
|
text1.text = Message;
|
39
39
|
|
40
|
-
GameObject time =
|
40
|
+
GameObject time = obj.transform.Find("time").gameObject;
|
41
41
|
Text text2 = time.GetComponentInChildren<Text>();
|
42
42
|
text2.text = Time;
|
43
43
|
}
|
1
護持を訂正
title
CHANGED
File without changes
|
body
CHANGED
@@ -14,11 +14,11 @@
|
|
14
14
|
void Start()
|
15
15
|
{
|
16
16
|
//プレハブ化したオブジェクトにアクセス
|
17
|
-
|
17
|
+
message = (GameObject)Resources.Load("message");
|
18
18
|
|
19
19
|
inputtext = messageinput.GetComponentInChildren<Text>();
|
20
|
-
|
20
|
+
messageparent = inputtext.transform.parent.gameObject;
|
21
|
-
form =
|
21
|
+
form = messageparent.GetComponent<InputField>();
|
22
22
|
|
23
23
|
nowtimetext = nowtime.GetComponentInChildren<Text>();
|
24
24
|
|
@@ -29,8 +29,8 @@
|
|
29
29
|
void loadmessage(int ID, string Message, string Time)
|
30
30
|
{
|
31
31
|
|
32
|
-
GameObject obj = Instantiate(
|
32
|
+
GameObject obj = Instantiate(message);
|
33
|
-
obj.name = "
|
33
|
+
obj.name = "message" + ID;
|
34
34
|
obj.transform.parent = list.transform;
|
35
35
|
|
36
36
|
GameObject messagetext = obj1.transform.Find("messagetext").gameObject;
|
@@ -49,8 +49,8 @@
|
|
49
49
|
objcun = list.transform.childCount;
|
50
50
|
|
51
51
|
|
52
|
-
GameObject obj = Instantiate(
|
52
|
+
GameObject obj = Instantiate(message);
|
53
|
-
obj.name = "
|
53
|
+
obj.name = "message" + cun;
|
54
54
|
obj.transform.parent = list.transform;
|
55
55
|
|
56
56
|
GameObject messagetext = obj.transform.Find("messagetext").gameObject;
|