コード例 #1
0
    static void Create()
    {
        GameObject         gameObject = new GameObject("PlayMakerCommsTool");
        PlayMakerCommsTool s          = gameObject.AddComponent <PlayMakerCommsTool>();

        s.Rebuild(true);
    }
コード例 #2
0
    static void Init()
    {
        // If Playmaker is not initialised we get errors. Opening the editor solves that
        if (FsmEditorWindow.IsOpen() == false)
        {
            FsmEditorWindow.OpenWindow();
        }

        // Get existing open window or if none, make a new one:
        PlayMakerCommsToolWindow window = (PlayMakerCommsToolWindow)EditorWindow.GetWindow(typeof(PlayMakerCommsToolWindow));

        if (pmCommsTool == null)
        {
            pmCommsTool = FindObjectOfType(typeof(PlayMakerCommsTool)) as PlayMakerCommsTool;
            if (pmCommsTool == null)
            {
                GameObject gameObject = new GameObject("PlayMakerCommsTool");
                pmCommsTool = gameObject.AddComponent <PlayMakerCommsTool>();
            }
        }
        pmCommsTool.Rebuild(true);
    }