Null Reference Exception

There’s no errors before clicking, but whilst clicking, this happens:

The debug is:

.
(I edited the Debug’s names)

The “yyy” is NOT printed. Error ends at that alone.

This scope starts like this (BNClass triggers reaction and calls ANClass for action, and calls back):

Yes, I dropped existing button in the slot, there’s only one slot of this type, in this single instance, and button is in the slot of BNClass

Unity doesn’t seem to have any relation whatsoever with BNCLASS.CCOMMAND(), but has problems with MM_Single, which it behaves is unsigned.

Edit:
It’s definitely assigned:

Check and verify that BNCLASS was set from the GetComponent

if (VAR == "MM-SINGLE-BTN") {
            Debug.Log("xxx");
            if(!BNCLASS)
            {
                BNCLASS.CCOMMAND(CRL("xyz", "123"));
                Debug.Log("yyy");
            }else
            {
                Debug.Log("BNClass is Null");
            }
        }

if BNClass is set, then check if CRL is not = Null

if (VAR == "MM-SINGLE-BTN") {
            Debug.Log("xxx");
            if(!BNCLASS)
            {
                if(!CRL)
                {
                    Debug.Log("CRL is not null");
               
                    BNCLASS.CCOMMAND(CRL("xyz", "123"));
                    Debug.Log("yyy");
                }
            }else
            {
                Debug.Log("BNClass is Null");
            }
        }
1 Like