Editor Extensions
Kassets provides a set of editor extensions to help you work with Kassets more efficiently. These extensions are designed to help you create, manage, and debug Kassets instances.
Create Kassets Instances from Inspector
If you have a ScriptableObject
field in your MonoBehaviour
script,
you can create a new instance by clicking the Create
button in the inspector.
The new instance will be automatically assigned to the field.
Create
button will appear when the field is empty.
Modify Kassets Instances from referencing Components
An editor extension is provided to modify the Kassets instances directly from the referencing components. There's a dropdown to toggle and view the scriptable object's fields. This reduces the need to select the scriptable object asset in the project view.
Raise Events from Inspector
Instances of GameEvent
and its derived classes can have their events raised directly from the inspector.
This can be useful for debugging or testing purposes.
Simply click the Raise
button in the inspector to raise the event.
The Raise
button is enabled on Play mode.
Customize Instance's Behavior
Each instance of Kassets
can have its behavior customized from the inspector.
Customizable behaviors vary depending on the instance type.
GameEvent
Subscribe Behavior
: Select how the event should behave when it is raised, whetherPull
orPush
.- Note : This setting is only available when both UniRx and UniTask are imported.
Variable
Variable Event Type
: Select the event type that will be raised on variable events.ValueAssign
: Raise an event when the variable value is assigned, regardless of whether the value changes.ValueChanged
: Raise an event only when the variable value changes.
Auto Reset Value
: Reset the variable value to its initial value when Play Mode is stopped. Initial Value is defined as the value set before entering Play Mode.
By Unity's Scriptable Object default behavior, any changes made to the Scriptable Object instance in Play Mode will be saved.
Auto Reset Value
allows you to reset the value to the initial value when Play Mode is stopped.