- Home /
Missing Component Exception Error
I was new to Unity and was watching other people's lectures. However, the lecture uses a little older version of Unity and VirtualStudio and is having difficulty with progress.
tempBallPos = collider.Transform.Position;
tempBallScale = collider.Transform.Position;
However, it says >> colider << is no longer used so I changed it to-
tempBallPos = GetComponent <Collider> (). transform.position;
tempBallScale = GetComponent <Collider> (). transform.position;
But this time 'MissingComponentException: There is no 'Collider' attached to the "1" object, but a script is try to access it. You probably need to add a collider to the game object "1". component is attached before using it.' Error occurs. I do not know what to do.
Answer by dan_wipf · Aug 23, 2018 at 03:42 AM
well it means that you havent got any collider attached to the gameobject 1. a collider is for example https://docs.unity3d.com/Manual/class-BoxCollider.html have you attached something like this to the gameobject?