예제 #1
0
 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);
 }
예제 #2
0
    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);
    }
예제 #3
0
    /////////////////////////////////////////////////

    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);
    }
예제 #4
0
 public void DoSetUp()
 {
     UnityPlatform.Setup();
 }
예제 #5
0
 public void DoSetUp()
 {
     fullDirPath = Path.Combine(Application.dataPath, tempDirPath);
     Directory.CreateDirectory(fullDirPath);
     UnityPlatform.Setup();
 }
예제 #6
0
 void Start()
 {
     UnityPlatform.Setup();
     Config.FileManager.AddSource(new ResourcesSource("MissingFiles"));
     Config.Preload(RunTests);
 }