Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
First you need to get the Canvas transform. There are two ways to do this (actually more, but here are the main ones): 1) Hang a tag on the Canvas, and then use FindGameObjectWithTag. 2) Make it in the class where the Instantiate Transform field for Canvas will be called, and either do it in the first way at startup, or manually drag the Canvas in Unity into this field.
Then after Instantiate the created object (let's call it go) do go.transform.SetParent(*transform of our canvas*)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question