// get the Playmaker Photon proxy fsm.
        void Awake()
        {
            Debug.Log("Player awake", this);

            // get the photon proxy for Photon Fsm Proxy to send event.
            GameObject go = GameObject.Find("PlayMaker Photon Proxy");

            if (go == null)
            {
                Debug.LogError("Working with photon network require that you add a 'PlayMaker Photon Proxy' component to the gameObject. You can do so from the menu 'PlayMaker Photon/components/Add photon proxy to scene'");
                return;
            }


            //// get the proxy to set the debug flag.
            PlayMakerPhotonProxy _proxy = go.GetComponent <PlayMakerPhotonProxy>();

            if (_proxy != null)
            {
                debug          = _proxy.debug;
                LogMessageInfo = _proxy.LogMessageInfo;
            }

            _proxy.SanitizeGameObject(this.gameObject);
        }// Awake
Beispiel #2
0
        private void Awake()
        {
            if (Instance != null)
            {
                Destroy(this.gameObject);
            }

            Instance = this;

            DontDestroyOnLoad(this.gameObject);
        }
        /// <summary>
        /// Broadcasts the Last callback.
        ///
        /// </summary>
        void BroadcastCallback()
        {
            PlayMakerPhotonProxy.LogEventBroadcasting(DebugLabelPrefix, LastCallback.ToString(), LastCallbackEvent);

            PlayMakerFSM.BroadcastEvent(LastCallbackEvent);
        }