public bool useIniFile = false; // get client settings from an ini file or from this script #endregion Fields #region Methods // Start the TimelineServer if this client is acting as a server // One (and only one) client must be selected as a server void Awake() { Config config=Config.Load(Application.dataPath+"/../" + iniFileName + ".ini"); if (config == null) { config = new Config(); config.AddChild("IsServer", isServer); config.Save(Application.dataPath+"/../" + iniFileName + ".ini"); } if (useIniFile && config["IsServer"].BoolValue) { DontDestroyOnLoad(this); TimelineServer.Start(true); Debug.Log("Server Started"); } else { config["IsServer"].BoolValue = isServer; config.Save(Application.dataPath+"/../" + iniFileName + ".ini"); if (isServer) { DontDestroyOnLoad(this); TimelineServer.Start(true); Debug.Log("Server Started"); } } }