Answer the question
In order to leave comments, you need to log in
Unity how to create a UI prefab at the click location?
Here's how to create it at the click site? Game 2d. There is a prefab - an image with a child button. It is necessary to create it in the place of the click. How to implement it?
Answer the question
In order to leave comments, you need to log in
Not sure if it will work, but in theory it should.
1. create a prefab of the desired ui element
2. process the click and get the mouse position (google OnScreenPosition)
3. create an object, set canvas as its parent (X.transform.parent = Y.transform; )
4. save a link to this object for further manipulation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question