コード例 #1
0
        //! Starts the server connection interface. Initializes the state listener. Captures the game product name
        public void Awake()
        {
#if UNITY_EDITOR
            this.gameId = UnityEditor.PlayerSettings.productName;
#else
            StringBuilder uniqueGameId = new StringBuilder(96);
            if (0 == GameInterface.getGameIdentifier(uniqueGameId, (uint)uniqueGameId.Capacity))
            {
                this.gameId = uniqueGameId.ToString();
            }
            else
            {
                this.gameId = "";
            }
#endif

            if (this.gameId.Equals(""))
            {
                Debug.LogError("Product name not set!");
            }

            GameInterface.startServerInterface();

            this.stateListener = new StateListener();
            this.stateListener.HandleMessage += HandleStateUpdate;

            GameInterface.setHidden();

            //analytics = EscAnalytics.Instance;
            //analytics.Initialize(KEYWORD_GAME_ENGINE, this.gameId, "1.0", false);
            //analytics.TrackGameSessionBegin();
        }
コード例 #2
0
        /**
         * Overwrites the Awake method in ServerConnection.
         * Starts the connection interface and load/parse Info.plist
         *
         * @see Esc.GameInterface
         */
        public new void Awake()
        {
            gamesList = new Dictionary <string, string>();

            GameInterface.startLauncherInterface();
            GameInterface.setHidden();

            this.oscTransmitter = new OscTransmitter(MEDIALON_ENDPOINT_IP, MEDIALON_ENDPOINT_PORT);
        }