Table of Contents

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
Object
ScriptableObject
CharacterLayerDefinitionSO
Implements

Properties

AttachedCharacterType

public LayeredCharacterTypeSO AttachedCharacterType { get; }

Property Value

LayeredCharacterTypeSO

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

bool

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

bool

LayerName

The name used for the layer. Does NOT need to be unique.

public string LayerName { get; }

Property Value

string

Remarks

Used when displaying layer names in the Character Creator.

LayerOptions

public IReadOnlyList<CharacterLayerOption> LayerOptions { get; }

Property Value

IReadOnlyList<CharacterLayerOption>

Methods

AcquireAllLayerOptionsAsync(object, Action<float>)

public Task AcquireAllLayerOptionsAsync(object owner, Action<float> onProgress = null)

Parameters

owner object
onProgress Action<float>

Returns

Task

CollectLayerOptions_EditMode()

[Button("Collect Layer Options", EButtonEnableMode.Editor)]
public void CollectLayerOptions_EditMode()

GetLayerOptionFromID(string)

public CharacterLayerOption GetLayerOptionFromID(string layerOptionID)

Parameters

layerOptionID string

Returns

CharacterLayerOption

GetLayerOptionFromIndex(int)

public CharacterLayerOption GetLayerOptionFromIndex(int index)

Parameters

index int

Returns

CharacterLayerOption

GetLayerOptionFromKey(string)

public CharacterLayerOption GetLayerOptionFromKey(string key)

Parameters

key string

Returns

CharacterLayerOption

GetRandomLayerOption(bool)

public CharacterLayerOption GetRandomLayerOption(bool includeBlankIfApplicable = true)

Parameters

includeBlankIfApplicable bool

Returns

CharacterLayerOption

GetRandomLayerOption(List<string>)

public CharacterLayerOption GetRandomLayerOption(List<string> blacklist)

Parameters

blacklist List<string>

Returns

CharacterLayerOption

IsInitialized()

public bool IsInitialized()

Returns

bool

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

owner object