コード例 #1
0
        public void OnProcessScene(Scene scene, BuildReport report)
        {
            if (report == null || !AlembicBuildPostProcess.TargetIsSupported(report.summary.platform))
            {
                return;
            }

            var activeScene = SceneManager.GetActiveScene();

            SceneManager.SetActiveScene(scene);
            var players = Object.FindObjectsOfType <AlembicStreamPlayer>();
            var pathToStreamingAssets = GetStreamingAssetsPath(report.summary);

            foreach (var p in players)
            {
                ProcessAlembicStreamPlayerAssets(p, pathToStreamingAssets);
            }
            SceneManager.SetActiveScene(activeScene);
        }
コード例 #2
0
        public void OnProcessScene(Scene scene, BuildReport report)
        {
            if (report == null || !AlembicBuildPostProcess.TargetIsSupported(report.summary.platform))
            {
                return;
            }

            var activeScene = SceneManager.GetActiveScene();

            SceneManager.SetActiveScene(scene);
            var players = scene.GetRootGameObjects().SelectMany(root => root.GetComponentsInChildren <AlembicStreamPlayer>(true));
            var pathToStreamingAssets = GetStreamingAssetsPath(report.summary);

            foreach (var p in players)
            {
                ProcessAlembicStreamPlayerAssets(p, pathToStreamingAssets);
            }
            SceneManager.SetActiveScene(activeScene);
        }