Cannot read properties of undefined reading transform error
This could be occurring if you are trying to reference the transform
of a GameObject that has yet to be instantiated.
Possible solution:
- Make sure the object/prefab has been instantiated prior to referencing its transform.