Skip to content

Advanced Manual Activation

Andrew Gresyk edited this page Apr 1, 2022 · 3 revisions

Manual Activation

  1. By default, FSM instance is activated in its constructor and deactivated in destructor.

  2. In some cases, it's useful to keep constructed FSM instance un-activated, and wait for an appropriate moment.

  3. For example, for implementing a ROLE_SimulatedProxy actor in UE4.

  1. Enable manual activation:

    using Config = ffsm2::Config
                        ::ManualActivation;
                        
    using M = ffsm2::MachineT<Config>;
Method Description
void Instance::enter(); Activate instance
void Instance::exit(); Deactivate instance