I need to create a button and when the button is touched i need to call the transform.rotate function to be called. I am new to unity iphone and it would be of great help if anyone get me out of this.
Thank you
I need to create a button and when the button is touched i need to call the transform.rotate function to be called. I am new to unity iphone and it would be of great help if anyone get me out of this.
Thank you
what ? can you axplain that better ?
you mean a GUI (a button that let something move, or walk, or heal, or load a level)
I want a button that lets something to move an object
OnGUI()
{
if(GUI.Button(Rect(10,10,50,50),“Move it!”))
{
transform.Rotate();
}
}
GUI.Button works in many situations, but not so well in all iOS situations. I strongly recommend reading Unity’s GUI documentation if you’re aiming to use it to develop software for others.
Thanks for help and suggestions.
Since i have multiple objects, i need to select a object on tap. and then the function transform.rotate must work. I am scratching my heads to get it worked out. any advice is a welcome.