my codes wont work in unity iphone can someone pls help me
The GUI.Button elements in an OnGUI function should work in Unity iPhone as well and react to touch input.
I understand you want to set the texture of an object’s material? Try something like this:
public class Interface
{
public Texture texture;
void OnGUI()
{
if(GUI.Button(new Rect(50,50,100,100), "Set texture"))
{
transform.renderer.material.mainTexture=texture;
}
}
}
this should work on an iPhone too,
hope this helps