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(); }; }
private IEnumerator Load(string path) { Debug.LogFormat("load: {0}", path); if (m_loaded != null) { m_loaded.Dispose(); } var loader = new VCIImporter(); loader.Parse(path); yield return(loader.LoadCoroutine()); yield return(loader.SetupCorutine()); loader.ShowMeshes(); m_loaded = loader; }