HashedGeneralValue<T>
An abstract class in Alta.Values, Alta.
Base for game data assets (items, stats, recipes, materials and so on) that have a numeric hash. Assets are loaded lazily from Resources under the paths in HashedPathAttribute, or the type name if none.
- Listed in Other Alta assemblies
- Inherits or implements
HashedGeneralValue - Derived types
EffectDefinition,SmelterUpgrades,SmeltingRecipe,Biome,Distribution<TThis, T, TItem, TFestivityGroup>,LiquidVisualChunkDefinition,StewRecipe,CraftingPartType,CosmeticColor,PlayerEquipmentDefinition,Enchantment,BoulderDefinition,CommunalStorageUniqueIdentifier,Item,LiquidDefinition,LogicChannel,PresetLootSet,LandmarkIcon,Map,MapPiece,Tag,Glyph,PageCollection,GlobalPopulationDefinition,PopulationDefinition,PopulationRaycast,PopulationSetup,MeshPlacementData,VisibilityData,SimpleHashedGeneralValue<T>,StatDefinition,MaterialPropertyBlockSettings<T>,PlayerSaveData,PresetTree,TreeSpecies,MicroTutorialStep,BiomePreset,Curve,VfxData,Festivity,ForestBiome,GameAction,GrowthDefinition,LeaderboardDefinition,MouldDefinition,PhysicalMaterial,PlayerProgressFlag,PlayerUnlock,PrefabStageDefinition,ProfessionSkill,SetPieceData,TimedPrefabStageDefinition - Documented in Alta assemblies
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 readonly Logger logger | Shared NLog logger for every hashed value of this type. Logs missing hashes and names. |
5 private and internal fields
Properties
Methods
3 private and internal methods
| Member | What it is |
|---|---|
private static Dictionary<string, T> BuildNameDictionary() | Private: builds the name lookup from all loaded assets, with names lowercased and spaces removed. Logs duplicate names. |
private static IEnumerable<string> GetAssetPaths() | Private: the Resources folders to load from, from HashedPathAttribute or else the type's name. Cached in paths. |
private static IEnumerable<T> LoadAll() | Private: loads every asset of the type from its Resources folders, with isInResourceLoading set while it runs. |
Used in
Members of other types that take, return or hold a HashedGeneralValue<T>: