An abstract class in Alta.Values, Alta.
Base for game data assets identified by a hash. HashedGeneralValue<T> builds on it to load every asset of a type from Resources and look them up by hash or name.
Constructors
| Member | What it is |
|---|
protected HashedGeneralValue() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
| Member | What it is |
|---|
protected static Dictionary<Type, IEnumerable<HashedGeneralValue>> allValues | The loaded values for each type, filled in by each HashedGeneralValue<T>.CheckItems. |
protected int hash | Backing field for Hash, stored as an int and read-only in the inspector. |
1 private and internal field
| Member | What it is |
|---|
private static Logger logger | Logger for this class. |
Properties
| Member | What it is |
|---|
uint Hash { get; } | The asset's hash, its id when written to streams and saves. |
Methods
| Member | What it is |
|---|
static HashedGeneralValue OfType(Type type, uint hash) | Finds the value of the given type with the given hash, running that type's CheckItems first if it isn't loaded yet. |
Used in
Members of other types that take, return or hold a HashedGeneralValue: