void OnEnable() { var definitions = new ScriptDefinitions(BuildTargetGroup.Standalone); _appType |= definitions.IsSet("SERVER") ? ApplicationType.Server : ApplicationType.None; _appType |= definitions.IsSet("CLIENT") ? ApplicationType.Client : ApplicationType.None; _debugReplication = definitions.IsSet("CUBE_DEBUG_REP"); _debugTransport = definitions.IsSet("CUBE_DEBUG_TRA"); }
void Save() { var definitions = new ScriptDefinitions(BuildTargetGroup.Standalone); definitions.Set("SERVER", (_appType & ApplicationType.Server) != 0); definitions.Set("CLIENT", (_appType & ApplicationType.Client) != 0); definitions.Set("CUBE_DEBUG_REP", _debugReplication); definitions.Set("CUBE_DEBUG_TRA", _debugTransport); definitions.Write(); }