// This is so stupid. There needs to be a callback for creation in editor...
    private void OnEnable()
    {
#if UNITY_EDITOR
        // This shouldn't happen in a release build of the game
        if (_itemID == default)
        {
            _itemID = Guid.NewGuid();
            Debug.Log($"InventoryItemData.OnEnable: Creating GUID for item {_name} GUID: {_itemID}");
        }
#endif
    }
Exemple #2
0
    public override bool Equals(object obj)
    {
        SGUID guidobj = obj as SGUID;

        return(guidobj != null && _guid == guidobj._guid);
    }