Trouble with game objects

My public game objects are dragged and dropped into the inspector, and show up fine, but disappear when I click play mode, and subsequently do not work until I drag and drop them again in playmode.

I haven’t experienced this problem for a while and can’t remember how to fix it. Anyone have any suggestions?

3269853--252566--objects.PNG 3269853--252567--gameobjectsgone.PNG

check your code for Wiz = new Wizard(); or Wiz = getComponent();
these would override what you dragged into them

I’m using GetComponent.
Should I change it?

If it’s causing you issue then yes, I would remove it., comment it out to test it.
it must be failing and returning null, that could be why it’s getting removed when you press play.

Any chance your ‘Wizard_fire’ script is overwriting the fireball and lightning references in Awake() or Start()? eg:

private void Awake() {
    fireball = null; // whoops!
    lightning = null; // whoops!
}