- Home /
How to instantiate a prefab between Canvas and a Button?
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);
Your answer
Follow this Question
Related Questions
Hidden Canvas, doesn't disable interaction with buttons. 1 Answer
How To Scale GUI Based On Screen Resolution 1 Answer
Multiple Cars not working 1 Answer
toggle highlight script ? 0 Answers
Button only works once 1 Answer