예제 #1
0
        private static void ImportVci(UnityPath path)
        {
            if (!path.IsUnderAssetsFolder)
            {
                throw new Exception();
            }
            var importer = new VCIImporter();

            importer.ParseGlb(File.ReadAllBytes(path.FullPath));

            var prefabPath = path.Parent.Child(path.FileNameWithoutExtension + ".prefab");

            // save texture assets !
            importer.ExtranctImages(prefabPath);
            importer.ExtractAudio(prefabPath);
            importer.ExtractEffekseer(prefabPath);

            EditorApplication.delayCall += () =>
            {
                //
                // after textures imported
                //
                importer.Load();
                importer.SetupCorutine().CoroutinetoEnd();
                importer.SetupPhysics();
                importer.SetupAttachable();
                importer.SetupEffekseer();
                importer.SetupText();
                importer.SetupSpringBone();
                importer.SaveAsAsset(prefabPath);
                importer.EditorDestroyRoot();
            };
        }