--scriptable-object <name of the class> --add
Scriptable Objectclass ready to go
Scriptable Object is a gameplay class, of which can multiple instances can exist, instead of just 1 like any other.
They are used primarily for modifying actors in the scene, tracking state that doesn’t fit into the other gameplay class’ category, or for doing things entirely outside the engine’s systems.
Scriptable Object has a specific activity which is stored in a field called
activityFlags. This field stores the current state of the actor and therefore controls which events are called(in the next paragraph). The type of this field is an enum and below are the possible values:
SCRIPTABLE_OBJECT_ACTIVITY_FLAG_DISABLED SCRIPTABLE_OBJECT_ACTIVITY_FLAG_ACTIVE SCRIPTABLE_OBJECT_ACTIVITY_FLAG_INACTIVE
Scriptable Objects have the regular 3 events every gameplay class has, but they also have an additional 3 for when the
Scriptable Object is in an inactive state
virtual void inactiveTick(float deltaTime) override; virtual void inactiveBegin() override; virtual void inactiveEnd() override;
Scriptable Object is marked as disabled, no events are called
You can use the standard cast function to cast between a generic pointer type to it’s base type