Character Setup ItemUser before Inventory

Laocoon7

New member
Inventory Manager -> Setup -> Character Setup

Point to an empty GameObject and click Add Components.

Inventory script gets added before ItemUser.

If the item is selected as the editor quits, the CustomEditor tries to Initialize the Inventory script before ItemUser is available. This causes a MissingReferenceException on Inventory.cs:75. Manually swapping ItemUser before Inventory on the GameObject eliminates this error. Perhaps ItemUser could be added first from the Setup Script like the InventoryIdentifier?

EDIT: Well, apparently that doesn't fix it. It came back and I'll have to do some more digging.

EDIT2: It went away after a Assets->Reimport All + Restart. Must be a Unity thing. Sorry.
 
Last edited:
I just tried this and didn't get any errors, it might be a Unity things like you said.
I also checked the code, there is no way to get a missing reference at line 75... so something was definitely off with Unity
 
Top