14 lines
329 B
C#
14 lines
329 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
// class, not interface so Unity shows fields in Editor
|
|
public abstract class InventoryHolder : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private new string name;
|
|
|
|
public abstract IInventory Inventory { get; }
|
|
|
|
public string Name => name == null || name == "" ? gameObject.name : name;
|
|
}
|