playMaker

Author Topic: How to make an Event known to PlayMaker?  (Read 1291 times)

MrMatthias

  • Playmaker Newbie
  • *
  • Posts: 2
How to make an Event known to PlayMaker?
« on: September 27, 2014, 02:18:59 PM »
Hi,
how do you make an Event known to the PlayMaker Editor? I have a library i want to make usable with PlayMaker. So the user should see the events in the event browser.

MrMatthias

  • Playmaker Newbie
  • *
  • Posts: 2
Re: How to make an Event known to PlayMaker?
« Reply #1 on: September 27, 2014, 03:43:43 PM »
Is this the way to go?
Code: [Select]
using UnityEngine;
using UnityEditor;
using HutongGames.PlayMaker;

[InitializeOnLoad]
public class Foo
{

static Foo ()
{
FsmEvent e = new FsmEvent ("Foo");
e.IsGlobal = true;
FsmEvent.AddFsmEvent (e);
}
}