-
Notifications
You must be signed in to change notification settings - Fork 8
Instantiation and Context
Patrick Hardy edited this page Feb 8, 2019
·
4 revisions
When designing a State Machine Blueprint you can reference the object the State Machine represents by calling Get Context in any graph and casting it to your object type.
Think of this as being similar to Try Get Pawn Owner of Animation Blueprints.
You can create the State Machine any where by calling the static function "Create State Machine Instance". When you do so you must pass in both the class of the State Machine and the Context.
State Machine Components are wrappers for UObjects which also support Network Replication. By default the actor itself is passed in as the Context to the State Machine.
If you uncheck "Initialize on Begin Play" make sure to call Initialize on the actor component before starting it.