Table of Contents

Class CharacterTypeBaseSO

Namespace
BlazerTech.CharacterManagement.Characters
Assembly
Assembly-CSharp.dll

bass class for all Character Types.

public abstract class CharacterTypeBaseSO : ScriptableObject, IValidatable
Inheritance
Object
ScriptableObject
CharacterTypeBaseSO
Implements
Derived

Fields

PixelsPerUnit

[SerializeField]
[BoxGroup("Settings")]
public int PixelsPerUnit

Field Value

int

Properties

AnimatorController

The animator controller asset assigned to characters of this type.
Animations inside this controller should use sprites from the BaseSpritesheet.

public RuntimeAnimatorController AnimatorController { get; }

Property Value

RuntimeAnimatorController

BaseSpritesheet

Defines the required base sprite sheet for the Character Type.
Set this spritesheets Sprite Mode to Multiple and slice it. Whenever this character is used the sprites in the BaseSpritesheet will be used and a shader will then override them with the finalized character. Character spritesheets with mismatched dimensions will be rejected when validated.

public Texture2D BaseSpritesheet { get; }

Property Value

Texture2D

CharacterTypeID

A unique identifier used to reference this Character Type. Must be unique across all character types.

public string CharacterTypeID { get; }

Property Value

string

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

Methods

AddAddressableLabel_EditMode()

public bool AddAddressableLabel_EditMode()

Returns

bool

HasCorrectAddressableLabel_EditMode()

public bool HasCorrectAddressableLabel_EditMode()

Returns

bool

IsAddressable_EditMode()

public bool IsAddressable_EditMode()

Returns

bool

IsValidCharacterSpriteSheet(Sprite)

Returns true if the spritesheet is the same size as the BaseSpritesheet.

public virtual bool IsValidCharacterSpriteSheet(Sprite sprite)

Parameters

sprite Sprite

Returns

bool

PerformValidationCheck()

Checks/Rechecks if the object is valid and updates IsValid accordingly.

public virtual bool PerformValidationCheck()

Returns

bool

true if the object is valid after the check; otherwise, false.