Artificial intelligent assistant

Canvas のプレハブ化が上手くいきません。 uGUI Text Canvas public class NumberText : MonoBehaviour { public Canvas UICanvas; //UI void Awake(){ transform.SetParent(UICanvas.transform, false); } } > Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption. Canvas `GameObject.Find` Inspector … Canvas Hierarchy CanvasPanel Image Project !

`Assets/Prefabs/NumberText.prefab` NumberText
UICanvasInstantiate `Prefab`
ProjectViewPrefabInsrantiate

HierarchyCanvastransform.SetParent()


void Awake(){
var canvas = GameObject.FindObjectOfType();
transform.SetParent(canvas.transform, false);
}


ProjectViewGameObject

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 4d2bba3b1cf1be331217fdf54c5e20b0