Well i am having problems with scripts saying commands are obsolete i tryed using
var renderer = GetComonent<Renderer>();
but it wont help.
Well i am having problems with scripts saying commands are obsolete i tryed using
var renderer = GetComonent<Renderer>();
but it wont help.
There is a function called GetComponent(), but none called GetComonent() - notice the missing letter āpā. Try declaring the variable first followed by assignment:
var renderer : Renderer;
renderer = GetComponent.<Renderer>();
More details on valid or deprecated functions can be found in the Unity reference https://docs.unity3d.com/ScriptReference/Component.GetComponent.html