Example #1
0
        public virtual void Initialize(HttpServerModule server)
        {
            logger          = Msf.Create.Logger(GetType().Name);
            logger.LogLevel = logLevel;

            ComposeHtml();
        }
        protected override void Awake()
        {
            base.Awake();

            logger          = Msf.Create.Logger(typeof(ConnectionTo_Master).Name);
            logger.LogLevel = logLevel;

            // In case this object is not at the root level of hierarchy
            // move it there, so that it won't be destroyed
            if (transform.parent != null)
            {
                transform.SetParent(null, false);
            }

            if (readMasterServerAddressFromCmd)
            {
                // If master IP is provided via cmd arguments
                if (Msf.Args.IsProvided(Msf.Args.Names.MasterIp))
                {
                    masterIp = Msf.Args.MasterIp;
                }

                // If master port is provided via cmd arguments
                if (Msf.Args.IsProvided(Msf.Args.Names.MasterPort))
                {
                    masterPort = Msf.Args.MasterPort;
                }
            }

            if (Msf.Args.AutoConnectClient)
            {
                connectOnStart = true;
            }
        }