回答編集履歴
1
SetParent()の()内部で記載忘れがあったため変更した。
test
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
{
|
6
6
|
GameObject original = GameObject.Find("Image");
|
7
7
|
GameObject copied = Object.Instantiate(original) as GameObject;
|
8
|
-
copied.transform.SetParent(Canvas);
|
8
|
+
copied.transform.SetParent(Canvas, false);
|
9
9
|
copied.transform.Translate(-50, 0, 0);
|
10
10
|
}
|
11
11
|
```
|