Advertisement
Guest User

Unity pre-2021 VS - Instantiate Machine

a guest
Apr 30th, 2021
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using Ludiq;
  5. using Bolt;
  6.  
  7. [IncludeInSettings(true)]
  8. public static class XStateMachine
  9. {
  10. public static void InstantiateMachine(GameObject target, StateMacro macro)
  11. {
  12. target.AddComponent<StateMachine>().nest.SwitchToMacro(macro);
  13. }
  14.  
  15. }
  16. [IncludeInSettings(true)]
  17. public static class XFlowMachine
  18. {
  19. public static void InstantiateMachine(GameObject target, FlowMacro macro)
  20. {
  21. target.AddComponent<FlowMachine>().nest.SwitchToMacro(macro);
  22. }
  23.  
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement