A little confused about c# with Unity. This doesn’t work:
void Update () {
transform.position.Set(10.0f, 0.0f, 0.0f);
}
This does:
void Update () {
transform.position = new Vector3(10.0f, 0.0f, 0.0f);
}
Why?
A little confused about c# with Unity. This doesn’t work:
void Update () {
transform.position.Set(10.0f, 0.0f, 0.0f);
}
This does:
void Update () {
transform.position = new Vector3(10.0f, 0.0f, 0.0f);
}
Why?