Good Morning!!
I have a problem. I don´t know how to do this:
I have a GUI script to generate GUI game and I want that when I push in this button “palmeras” I want to do another action mouse later but in this context. I explain better again, I want to do that when I choose Palmeras in the GUI, I can place a palm in a position terrain I want with the mouse, but my problem is that I choose palm i dont know keep this choise for later to use the mouse to place the palm but I have to instantiate in the same code at instant but I can´t use the mouse to determinate the position.
How could I do this, please?
Thanks in advance
A piece of my code
…
if (GUI.Button (Rect (20, Screen.height / 2 - 30, 80, 20), “Palmeras”))
{
//I think here I need hold the script while I choose with mouse the palm position???
Instantiate(Palmeras, Input.mousePosition, transform.rotation);