Exemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            CyanEmuUdonHelper udonHelper = target as CyanEmuUdonHelper;

            CyanEmuSyncableEditorHelper.DisplaySyncOptions(udonHelper);

            UdonBehaviour udonBehaviour = udonHelper.GetUdonBehaviour();

            // TODO set public variables

            expand_ = EditorGUILayout.Foldout(expand_, "Run Custom Event");

            if (expand_)
            {
                foreach (string eventName in udonBehaviour.GetPrograms())
                {
                    if (GUILayout.Button(eventName))
                    {
                        udonBehaviour.SendCustomEvent(eventName);
                    }
                }
            }
        }
Exemplo n.º 2
0
        public static void OnInit(UdonBehaviour behaviour, IUdonProgram program)
        {
            CyanEmuUdonHelper helper = behaviour.gameObject.AddComponent <CyanEmuUdonHelper>();

            helper.SetUdonBehaviour(behaviour);

            NetworkReadyFieldInfo_.SetValue(behaviour, CyanEmuMain.IsNetworkReady());
        }
Exemplo n.º 3
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            CyanEmuUdonHelper udonHelper = target as CyanEmuUdonHelper;

            CyanEmuSyncableEditorHelper.DisplaySyncOptions(udonHelper);

            UdonBehaviour udonBehaviour = udonHelper.GetUdonBehaviour();

            ShowVariableEditor(udonBehaviour);

            ShowExportedEvents(udonBehaviour);
        }