- Home /
Can't drag object references!!
In my text feature in my script, it requires a text reference to be dragged into it in the editor. But i cannot do this, it does not give me the option to when i drag the text reference to the slot. HELP
Script:
GameObject prefab;
public float zeoring;
bool zeoroed400;
bool zeoroed500;
int zeoringint400;
Animator anim;
bool Sprinting;
bool rangefinder;
int rangepress;
public float distance;
private int shotsfired;
public bool running;
AudioSource audio;
public AudioClip SniperGunshot;
public Text Range;
public Camera GunCam;
public Camera ScopeCam;
void Start()
{
RangeText();
}
void RangeText();
{
Range.text = "Zeoring: " + zeoring.ToString();
}
Comment
Answer by RangerDog · Nov 11, 2016 at 09:45 AM
Have you made it the right component? It needs to be a UI Text component, and also you can't drag in UI Prefabs, it has to be in the scene. Anyways, we need a bit more info, where is what located etc?