- Home /
Plane created on runtime doesn't show on the Android device
Hi Everyone,
I try to created a plane on runtime with the below codes:
GameObject plane = GameObject.CreatePrimitive(PrimitiveType.Plane);
plane.transform.position = new Vector3(0, 0, 0);
plane.transform.localScale = new Vector3(15, 15, 15);
plane.transform.renderer.material.color = Color.red;
It work well on the preview when i hit the play button but when i build and run it on an Android device, no plane is there!
Has anyone came across this problem or know the solution to this problem, kindly share with me.
Thanks in advance!
I'm having this issue right now. Did you find a way to resolve it?
Answer by dannyskim · Oct 25, 2011 at 03:41 PM
Hmm, I haven't had any problems with this. What Android device are you using and what API Level is it currently sitting at?
One thing I may suggest is to
transform.lookat( plane.transform, Vector3.up );
on your camera
Hi dannyskim,
Thank you for your reply. I will give it a try and get back soon. As for the information:
Android device: Sony Ericsson Xperia Arc
API Level (On Device): 2.3.3
Anyone can help here? Cause it seem like the script that i wrote for the about code just dont get read when it's running on the above mention android device but it work when i hit play button.