Class CharacterAsset
- Namespace
- SurvivorsMaker.Data
- Assembly
- SurvivorsMaker.Data.dll
Inspector-authored character data converted to a cached runtime definition.
[CreateAssetMenu(menuName = "Survivor Roguelite Maker/Content/Character", fileName = "Character")]
public sealed class CharacterAsset : ContentDefinitionAsset<CharacterDef>, IContentTextSource
- Inheritance
-
ObjectScriptableObjectCharacterAsset
- 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
CharacterAsset()
public CharacterAsset()
Fields
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
BannedGroups
Reject candidates in any listed pool group. Empty = no group bans.
[Tooltip("Reject candidates in any listed pool group. Empty = no group bans.")]
public List<string> BannedGroups
Field Value
BannedItems
Item definitions excluded for this character. Empty = no item bans.
[Tooltip("Item definitions excluded for this character. Empty = no item bans.")]
public List<ItemAsset> BannedItems
Field Value
BannedTags
Reject candidates with any listed tag. Empty = no tag bans.
[Tooltip("Reject candidates with any listed tag. Empty = no tag bans.")]
public List<string> BannedTags
Field Value
BannedWeapons
Weapon definitions excluded for this character. Empty = no weapon bans.
[Tooltip("Weapon definitions excluded for this character. Empty = no weapon bans.")]
public List<WeaponAsset> BannedWeapons
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
MeleeAllowed
Allow melee weapon offers and acquisitions for this character.
[Tooltip("Allow melee weapon offers and acquisitions for this character.")]
public bool MeleeAllowed
Field Value
PoolBans
Channel and wave-specific candidate bans. Empty = no additional bans.
[Tooltip("Channel and wave-specific candidate bans. Empty = no additional bans.")]
public List<OfferBanEntry> PoolBans
Field Value
PoolConstraints
Character candidate limits, used only when Use Pool Constraints is on.
[Tooltip("Character candidate limits, used only when Use Pool Constraints is on.")]
public CharacterPoolConstraints PoolConstraints
Field Value
PreferredTags
Relative offer weights by tag; multiplier 1 leaves the weight unchanged.
[Tooltip("Relative offer weights by tag; multiplier 1 leaves the weight unchanged.")]
public List<TagWeight> PreferredTags
Field Value
RangedAllowed
Allow ranged weapon offers and acquisitions for this character.
[Tooltip("Allow ranged weapon offers and acquisitions for this character.")]
public bool RangedAllowed
Field Value
StartingItems
Items granted at run start. Repeated references grant repeated copies.
[Tooltip("Items granted at run start. Repeated references grant repeated copies.")]
public List<ItemAsset> StartingItems
Field Value
StartingWeapons
Weapons offered as starting loadout choices, in selection order.
[Tooltip("Weapons offered as starting loadout choices, in selection order.")]
public List<WeaponAsset> StartingWeapons
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 = \"character.<Id>\".")]
public string TextKey
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
UsePoolConstraints
Copy character slot and duplicate constraints. Off uses the runtime defaults.
[Tooltip("Copy character slot and duplicate constraints. Off uses the runtime defaults.")]
public bool UsePoolConstraints
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(CharacterDef)
Fills the already-cached definition shell; resolve asset references through their conversion caches.
protected override void Populate(CharacterDef def)
Parameters
defCharacterDef
ToCharacterDef()
Returns the cached runtime definition for this asset revision; repeated references preserve object identity.
public CharacterDef ToCharacterDef()
Returns
Validate()
Returns authoring problems without repairing or changing serialized fields; an empty list means valid.
public override List<string> Validate()