I'm new to unity :
I create in Unity a simple cube and put some texture over. I rotate the cube... move camera....then export to android studio. When I run everything looks like in Unity.
But I want to move camera or the cube from android studio code ( programming lines ) and I can not find any way to .."findViewById" or similar to be able to find my cube :)
I try to make a C# file ( I just crate one in assets folder ) and put :
public class test : MonoBehaviour {
public GameObject respawn;
void Start () {
Debug.Log("aaaaaaaaaaaaa1111111111111111");
if (respawn == null)
respawn = GameObject.FindWithTag("mamaie");
respawn.transform.Rotate(10f, 50f, 10f);
}
// Update is called once per frame
void Update () {
transform.Rotate(10f, 50f, 10f);
}
void LateUpdate()
{
transform.Rotate(10f, 50f, 10f);
}
}
So... how can I control my cube ( designed in unity and imported in android studio ) from programming lines ?