Class CharacterLayerDefinitionSO
- Namespace
- BlazerTech.CharacterManagement.Characters
- Assembly
- Assembly-CSharp.dll
[CreateAssetMenu(menuName = "BlazerTech/Character Management System/Layered Character Types/Layer Definition", fileName = "New Character Layer")]
public class CharacterLayerDefinitionSO : ScriptableObject, IValidatable
- Inheritance
-
ObjectScriptableObjectCharacterLayerDefinitionSO
- Implements
Properties
AttachedCharacterType
public LayeredCharacterTypeSO AttachedCharacterType { get; }
Property Value
IncludeBlankOption
If toggled, adds a 'None' option as the first layer option. Applies immediately when toggled and when CollectLayerOptions_EditMode() is run.
public bool IncludeBlankOption { get; }
Property Value
IsValid
Gets a value indicating whether the object is currently valid.
This value should be updated when PerformValidationCheck() is called.
public bool IsValid { get; }
Property Value
LayerName
The name used for the layer. Does NOT need to be unique.
public string LayerName { get; }
Property Value
Remarks
Used when displaying layer names in the Character Creator.
LayerOptions
public IReadOnlyList<CharacterLayerOption> LayerOptions { get; }
Property Value
Methods
AcquireAllLayerOptionsAsync(object, Action<float>)
public Task AcquireAllLayerOptionsAsync(object owner, Action<float> onProgress = null)
Parameters
Returns
CollectLayerOptions_EditMode()
[Button("Collect Layer Options", EButtonEnableMode.Editor)]
public void CollectLayerOptions_EditMode()
GetLayerOptionFromID(string)
public CharacterLayerOption GetLayerOptionFromID(string layerOptionID)
Parameters
layerOptionIDstring
Returns
GetLayerOptionFromIndex(int)
public CharacterLayerOption GetLayerOptionFromIndex(int index)
Parameters
indexint
Returns
GetLayerOptionFromKey(string)
public CharacterLayerOption GetLayerOptionFromKey(string key)
Parameters
keystring
Returns
GetRandomLayerOption(bool)
public CharacterLayerOption GetRandomLayerOption(bool includeBlankIfApplicable = true)
Parameters
includeBlankIfApplicablebool
Returns
GetRandomLayerOption(List<string>)
public CharacterLayerOption GetRandomLayerOption(List<string> blacklist)
Parameters
Returns
IsInitialized()
public bool IsInitialized()
Returns
PerformValidationCheck()
Checks/Rechecks if the object is valid and updates IsValid accordingly.
public bool PerformValidationCheck()
Returns
- bool
true if the object is valid after the check; otherwise, false.
ReleaseAllLayerOptions(object)
public void ReleaseAllLayerOptions(object owner)
Parameters
ownerobject