private void Awake()
        {
            _texPropId = Shader.PropertyToID("_Tex");

            ZipUtility.Init();
            DlcPath.Init();

            _skyboxMaterial = new Material(_defaultSkyboxMaterial);
            _skyboxMaterial.SetTexture(_texPropId, _defaultSkyboxCubemap);

            FindExistingVivePackages();

            SetupWatcher();
            _baseActiveScene = SceneManager.GetActiveScene();
        }
Esempio n. 2
0
        public static IObservable<Unit> ExtractPackage(Parameters parameters)
        {
            return Observable.Start(() =>
                {
                    var src = parameters.SrcPath;
                    var dst = parameters.DestPath;

                    if (string.IsNullOrEmpty(src) || !File.Exists(src)) throw new FileNotFoundException(src);

                    if (!Directory.Exists(dst))
                        Directory.CreateDirectory(dst);

                    var error = ZipUtility.UnzipPackage(dst, src);
                    CheckForError(error);
                })
                .ObserveOnMainThread();
        }