I have prefab instantiating on Canvas but its image blocks the Button. So I need to make prefab instantiate between Canvas and the Button in 2d, I already tried to work with Z-axis but it doesn't help. Canvases Render Mode is Screen Space - Overlay. Here's the part of the code: GameObject barankas = Instantiate(baranka, new Vector3(Random.Range(-150, 150), Random.Range(-20, -150),Random.Range(20, 150)), Quaternion.identity) as GameObject; barankas.transform.SetParent(GameObject.FindGameObjectWithTag("Canvas").transform, false);
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
7 People are following this question.
How to make a Interactive Computer Screen in Unity 5.5?
How do you access the Blocking Mask of GraphicsRaycaster in code?
GUI Button Texture only showing as small
Disable and enable canvas group by pressing an UI button. (C#)
How To make a Ui button Chance colours when pressed