Skip to main content

HashedGeneralValue

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​

MemberWhat it is
protected HashedGeneralValue()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

MemberWhat it is
protected static Dictionary<Type, IEnumerable<HashedGeneralValue>> allValuesThe loaded values for each type, filled in by each HashedGeneralValue<T>.CheckItems.
protected int hashBacking field for Hash, stored as an int and read-only in the inspector.
1 private and internal field
MemberWhat it is
private static Logger loggerLogger for this class.

Properties​

MemberWhat it is
uint Hash { get; }The asset's hash, its id when written to streams and saves.

Methods​

MemberWhat 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: