void Start() { UnityPlatform.Setup(); Config.FileManager.AddSource(new ResourcesSource("TestComposedConfigs")); Config.FileManager.HotloadCheckInterval = 0.1f; // increase rate of checking so we don't have to wait as long for the test Config.Preload(RunTests); }
IEnumerator WaitAndStartGame() { // this latency is purely because Unity's profiler doesn't capture the first frame a game is running yield return(new WaitForSeconds(0.1f)); UnityPlatform.Setup(); Config.FileManager.AddSource(new FileSource(Application.dataPath + "/Demo/Resources/Configs", hotload: true)); m_sw = Stopwatch.StartNew(); // uncomment to disable periodic hotloading of files, it'll have to be manual //Config.FileManager.IsHotloadingFiles = false; Config.Preload(StartGame); }
///////////////////////////////////////////////// void Awake() { #if DEBUG // Be strict in debug mode so that content creators will be quickly // notified of any mistakes. It will warn for any missing fields // (which haven't been annotated with ConfigAllowMissing) and for any // extra fields. Configs.Settings.DefaultReifierOptions = ReificationOptions.None; #else // In production mode, ignore missing/extra checks. This makes // loading faster. ConfigMandatory fields are still checked. Configs.Settings.DefaultReifierOptions = ConfigOptions.AllowMissingExtraFields; #endif UnityPlatform.Setup(); Configs.FileManager.AddSource(new FileSource(Application.dataPath + "/Demo/Resources/Configs", ".bytes", hotload: true)); stopwatch = Stopwatch.StartNew(); // uncomment to disable periodic hotloading of files, it'll have to be manual //Configs.FileManager.IsHotloadingFiles = false; // preload will call StartGame when it's finished Configs.Preload(StartGame); }
public void DoSetUp() { UnityPlatform.Setup(); }
public void DoSetUp() { fullDirPath = Path.Combine(Application.dataPath, tempDirPath); Directory.CreateDirectory(fullDirPath); UnityPlatform.Setup(); }
void Start() { UnityPlatform.Setup(); Config.FileManager.AddSource(new ResourcesSource("MissingFiles")); Config.Preload(RunTests); }