コード例 #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
ファイル: LoadGame.cs プロジェクト: roygear/DarkConfig
    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
ファイル: LoadGame.cs プロジェクト: grahamboree/DarkConfig
    /////////////////////////////////////////////////

    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
        public static void UnityBuild(this ICakeContext context, DirectoryPath projectPath, UnityPlatform platform)
        {
            var tool = new UnityRunner(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools);

            tool.Run(context, projectPath, platform);
        }
コード例 #7
0
ファイル: MissingFiles.cs プロジェクト: whowgames/DarkConfig
 void Start()
 {
     UnityPlatform.Setup();
     Config.FileManager.AddSource(new ResourcesSource("MissingFiles"));
     Config.Preload(RunTests);
 }