Pressing button, calling function, major error

I have no idea. Situation is rather simple. I have a button, I want to press this button, upon pressing this button, an entire GameObject should get disabled.

Before pressing “Play” button, I get no errors, Microsoft Visual Studio doesn’t return an error either.

The error is weird (at least to me) and it says:

The “ActionTrigger” is public void, with single string variable. I have no idea.

PS 1: Yes, I’ve thrown reference of IS_StartBtn into the slot. And all others. This is also a very simple project, so there’s no collision or mistake due to massivity of the project.

Object reference not set to an instance of an object usually means something is null.

On line 18,

  • Are you sure IS_StartBtn is set to something, or maybe it’s null?
  • Are you sure GameMgr is set to something, or maybe it’s null?

Use Debug.Log() for both above line 18. Look in the inspector tab for references you may have forgotten to fill with a drag-and-drop operation.

1 Like

Yea… confused a random line with “this is where I definitely set the GameMgr”.