예제 #1
0
        ThreeSceneRoot BuildThreeSceneRoot(UnitySceneRoot root)
        {
            var report = new Report("ThreeSceneConvert");

            report.UseConsole = false;
            var visitor = new ThreeSceneConvertVisitor(report);

            return(visitor.Run(unitySceneRoot));
        }
예제 #2
0
        public SceneExporter(GameObject[] gos, string targetFilePath)
        {
            pathHelper = new ExportPathHelper(targetFilePath);

            unitySceneRoot = new UnitySceneRoot();
            foreach (var go in gos)
            {
                unitySceneRoot.Add(go);
            }
        }
예제 #3
0
        UnitySceneRoot BuildUnitySceneRoot(GameObject[] gos)
        {
            var root = new UnitySceneRoot();

            foreach (var go in gos)
            {
                root.Add(go);
            }
            return(root);
        }
예제 #4
0
        void DumpUnitySceneRoot(UnitySceneRoot root)
        {
            var report = new Report("unity-scene-dump");

            report.UseConsole = false;

            var dumpVisitor = new DumpVisitor(report);

            dumpVisitor.Run(root);

            report.SaveReport("unity-scene.log");
        }
예제 #5
0
 public SceneExporter(GameObject[] gos)
 {
     unitySceneRoot = BuildUnitySceneRoot(gos);
 }
예제 #6
0
        public void Run(UnitySceneRoot root)
        {
            report.Info("# Project Settings");
            Visit(root.Settings);
            report.Info("");

            // containers
            report.Info("# Material");
            foreach (var n in root.ContainerTable.GetEnumerable <MaterialContainer>())
            {
                Visit(n);
                report.Info("");
            }

            report.Info("# Texture");
            foreach (var n in root.ContainerTable.GetEnumerable <TextureContainer>())
            {
                Visit(n);
                report.Info("");
            }

            /*
             * TODO
             * report.Info("# Lightmap");
             * foreach (var x in n.LightmapEnumerable) {
             *  Visit(x.Value);
             *  report.Info("");
             * }
             */

            // scene graph
            report.Info("# Mesh");
            foreach (var n in root.ContainerTable.GetEnumerable <MeshContainer>())
            {
                Visit(n);
                report.Info("");
            }

            // component
            report.Info("# Render");
            foreach (var n in root.GraphNodeTable.GetEnumerable <RenderNode>())
            {
                Visit(n);
                report.Info("");
            }

            report.Info("# Camera");
            foreach (var n in root.GraphNodeTable.GetEnumerable <CameraNode>())
            {
                Visit(n);
                report.Info("");
            }

            report.Info("# Light");
            foreach (var n in root.GraphNodeTable.GetEnumerable <LightNode>())
            {
                Visit(n);
                report.Info("");
            }

            report.Info("# Script");
            foreach (var n in root.GraphNodeTable.GetEnumerable <ScriptNode>())
            {
                Visit(n);
                report.Info("");
            }

            // gameobject
            report.Info("# GameObject");
            foreach (var n in root.GraphNodeTable.GetEnumerable <GameObjectNode>())
            {
                Visit(n);
                report.Info("");
            }
        }