Hi, I’m no beginner with Unity but I’ve found no solution to this. I am simply trying to update the transform of a gameObject.
public GameObject Rider1;
public void UpdateRider(Vector3 pos)
{
Debug.Log("HERE1 " + pos.ToString());
Rider1.transform.position = pos;
Debug.Log("HERE2");
}
GameObject Rider1 is an instance of a prefab. updateRider is called every 0.2 secs which is verified by the debug statements. The problem is it only prints (eg) “HERE1 (0.0, 0.22, 0.0)” and not “HERE2” which I assume means it has encountered an error during the transform method. Upon expection of the scene, neither the bike moves, nor its transform values update.
There are no warnings or error messages. I’d appreciate any help because I don’t know what else to try.