Class ItemAsset
- Namespace
- SurvivorsMaker.Data
- Assembly
- SurvivorsMaker.Data.dll
Inspector-authored item data converted to a cached runtime definition.
[CreateAssetMenu(menuName = "Survivor Roguelite Maker/Content/Item", fileName = "Item")]
public sealed class ItemAsset : ContentDefinitionAsset<ItemDef>, IContentTextSource
- Inheritance
-
ObjectScriptableObjectItemAsset
- Implements
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetEntityId()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Constructors
ItemAsset()
public ItemAsset()
Fields
Acquisition
Channel eligibility and ownership limits; used only when Use Acquisition is on.
[Tooltip("Channel eligibility and ownership limits; used only when Use Acquisition is on.")]
public AcquisitionPolicy Acquisition
Field Value
Available
Allow this definition in normal selection pools; explicit authored references remain separate.
[Tooltip("Allow this definition in normal selection pools; explicit authored references remain separate.")]
public bool Available
Field Value
BasePrice
Nonnegative currency price before wave and character price modifiers.
[Tooltip("Nonnegative currency price before wave and character price modifiers.")]
public int BasePrice
Field Value
Description
Plain text description shown with the name; empty = no description.
[Tooltip("Plain description shown with the name.")]
[TextArea(2, 5)]
public string Description
Field Value
DisplayName
Display label; empty uses a name derived from the content id.
[Tooltip("Name shown in menus, cards, alerts and records. Empty = derived from the Id.")]
public string DisplayName
Field Value
Effects
Stat effects in authored order. Empty = no stat bonuses.
[Tooltip("Stat effects in authored order. Empty = no stat bonuses.")]
public List<EffectEntry> Effects
Field Value
Id
Stable, nonempty content id. Keep unique within its content kind and unchanged for saved runs.
[Tooltip("Stable, nonempty content id. Keep unique within its content kind and unchanged for saved runs.")]
public string Id
Field Value
Kind
Item for shops or Upgrade for level-up pools; Item is the default.
[Tooltip("Item for shops or Upgrade for level-up pools; Item is the default.")]
public ItemKind Kind
Field Value
LifetimeWaves
Active wave count including acquisition wave; 0 = no wave expiry.
[Tooltip("Active wave count including acquisition wave; 0 = no wave expiry.")]
public int LifetimeWaves
Field Value
MaxOwned
Maximum owned item copies; 0 = unlimited.
[Tooltip("Maximum owned item copies; 0 = unlimited.")]
public int MaxOwned
Field Value
PoolGroups
Case-sensitive pool group ids used by group bans and duplicate limits.
[Tooltip("Case-sensitive pool group ids used by group bans and duplicate limits.")]
public List<string> PoolGroups
Field Value
Tags
Case-sensitive candidate tags for weighting, filtering and build synergy counts.
[Tooltip("Case-sensitive candidate tags for weighting, filtering and build synergy counts.")]
public List<string> Tags
Field Value
TextKey
Optional localization key base; empty uses the content kind and id.
[Tooltip("Optional localization key base: \"<key>.name\" and \"<key>.description\". Empty = \"item.<Id>\".")]
public string TextKey
Field Value
Tier
Zero-based offer tier; must be nonnegative. Tier 0 is the lowest tier.
[Tooltip("Zero-based offer tier; must be nonnegative. Tier 0 is the lowest tier.")]
public int Tier
Field Value
Triggers
Triggered actions in authored order. Empty = no actions.
[Tooltip("Triggered actions in authored order. Empty = no actions.")]
public List<TriggerDef> Triggers
Field Value
UseAcquisition
Copy the acquisition policy. Off retains the default channel eligibility and limits.
[Tooltip("Copy the acquisition policy. Off retains the default channel eligibility and limits.")]
public bool UseAcquisition
Field Value
UseTriggerRules
Opt in to extended trigger events, conditions and counters; false retains legacy trigger semantics.
[Tooltip("Copy extended trigger conditions and counters. Off preserves the basic trigger path.")]
public bool UseTriggerRules
Field Value
Methods
Populate(ItemDef)
Fills the already-cached definition shell; resolve asset references through their conversion caches.
protected override void Populate(ItemDef def)
Parameters
defItemDef
ToItemDef()
Returns the cached runtime definition for this asset revision; repeated references preserve object identity.
public ItemDef ToItemDef()
Returns
Validate()
Returns authoring problems without repairing or changing serialized fields; an empty list means valid.
public override List<string> Validate()