I am using a slider component for diffrent bars for my GUI. I have a slider(FuelShower) I am trying to access. I create the variable with:
public Slider FuelShower;
_
Which I then assign in Start() using:
FuelShower = GameObject.Find(“FuelShower”).GetComponent();
_
I am getting the error
GetComponent requires that the requested component ‘Slider’ derives from MonoBehaviour or Component or is an interface.
UnityEngine.GameObject.GetComponent[T] ()
from my code.
I do not know what is going wrong, or how to fix it.