Module

Abstract Scriptable Object

Description

Modules are a way to add additional functionality to each StatusEffectData. Create one by simply inheriting from the Module class and implementing the necessary methods or using Create > Status Effect Framework > Module Script.

triangle-exclamation

Truthfully anything can be done with them as they are just an inheritable abstract class that calls a method. It is highly recommended to take a look at the samplesarrow-up-right for an idea of how to use them.

circle-info

Make sure to checkout ModuleInstance to see how you can setup unique module data per StatusEffectData!

UniTask Support

Note that if you have UniTaskarrow-up-right in your project then the Module will use UniTasksarrow-up-right over Awaitablearrow-up-right. This is also included in the samples.

Legacy Support

Note that if you are using an ealier version than Unity 2023.1 then the Module will use Coroutinesarrow-up-right over Awaitablearrow-up-right (as it doesn't exist in previous versions). Like UniTaskarrow-up-right it is also included in the samples and the DisableModule abstract method is can be used used.

Abstract Methods

Name
Description

EnableModule

An Awaitablearrow-up-right that is started when the StatusEffect begins.

DisableModule

(pre 2023.1 only) A method that is invoked when the StatusEffect is stopped.

Example

Last updated