Table of Contents

Class CharacterRendererBase

Namespace
BlazerTech.CharacterManagement.Components
Assembly
Assembly-CSharp.dll
[DisallowMultipleComponent]
public abstract class CharacterRendererBase : MonoBehaviour
Inheritance
Object
Component
Behaviour
MonoBehaviour
CharacterRendererBase
Derived

Fields

_animator

The Animator to apply the Animator Controller to

[SerializeField]
[ShowIf("setAnimatorController")]
[BoxGroup("References")]
protected Animator _animator

Field Value

Animator

_renderer

The Renderer to apply the character shader to.

[SerializeField]
[BoxGroup("References")]
protected Renderer _renderer

Field Value

Renderer

isValid

protected bool isValid

Field Value

bool

loadCharacterOnStart

Toggles if the character should be loaded when the Start method is called.

[SerializeField]
[BoxGroup("Loading")]
protected bool loadCharacterOnStart

Field Value

bool

loadingMode

Option to load character asynchronously or synchronously.

[SerializeField]
[BoxGroup("Loading")]
protected CharacterLoaderLoadingMode loadingMode

Field Value

CharacterLoaderLoadingMode

setAnimatorController

Toggles if the Animator Controller set in Character Type should be used.

[Tooltip("Override the animator controller with the one assigned in the Character Type")]
[SerializeField]
[BoxGroup("References")]
protected bool setAnimatorController

Field Value

bool

Properties

LoadedCharacter

public abstract ICharacter<CharacterTypeBaseSO, LoadedCharacterHandlerBase> LoadedCharacter { get; }

Property Value

ICharacter<CharacterTypeBaseSO, LoadedCharacterHandlerBase>

Methods

GetAndShowCharacter()

public abstract Task GetAndShowCharacter()

Returns

Task

InvokeOnCharacterLoaded(ICharacter<CharacterTypeBaseSO, LoadedCharacterHandlerBase>)

protected void InvokeOnCharacterLoaded(ICharacter<CharacterTypeBaseSO, LoadedCharacterHandlerBase> character)

Parameters

character ICharacter<CharacterTypeBaseSO, LoadedCharacterHandlerBase>

OnDestroy()

protected virtual void OnDestroy()

ReleaseCharacter()

protected abstract void ReleaseCharacter()

ShowCharacter()

protected abstract void ShowCharacter()

TrySetCharacterAnimator(CharacterTypeBaseSO)

protected void TrySetCharacterAnimator(CharacterTypeBaseSO characterType)

Parameters

characterType CharacterTypeBaseSO

ValidationCheck()

protected virtual bool ValidationCheck()

Returns

bool

Events

OnCharacterLoaded

public event EventHandler<ICharacter<CharacterTypeBaseSO, LoadedCharacterHandlerBase>> OnCharacterLoaded

Event Type

EventHandler<ICharacter<CharacterTypeBaseSO, LoadedCharacterHandlerBase>>