Пример #1
0
 void ImportProgress(UnityGLTF.GLTFEditorImporter.IMPORT_STEP step, int current, int total)
 {
     if (_importProgress != null)
     {
         _importProgress(step, current, total);
     }
 }
Пример #2
0
        public void UpdateProgress(UnityGLTF.GLTFEditorImporter.IMPORT_STEP step, int current, int total)
        {
            string element = "Importing GLTF model " + Path.GetFileName(_gltfQueue[0].Path) + ": ";

            switch (step)
            {
            case GLTFEditorImporter.IMPORT_STEP.BUFFER:
                element += "Buffer";

                break;

            case UnityGLTF.GLTFEditorImporter.IMPORT_STEP.IMAGE:
                element += "Image";

                break;

            case UnityGLTF.GLTFEditorImporter.IMPORT_STEP.TEXTURE:
                element += "Texture";

                break;

            case UnityGLTF.GLTFEditorImporter.IMPORT_STEP.MATERIAL:
                element += "Material";

                break;

            case UnityGLTF.GLTFEditorImporter.IMPORT_STEP.MESH:
                element += "Mesh";

                break;

            case UnityGLTF.GLTFEditorImporter.IMPORT_STEP.NODE:
                element += "Node";

                break;

            case UnityGLTF.GLTFEditorImporter.IMPORT_STEP.ANIMATION:
                element += "Animation";

                break;

            case UnityGLTF.GLTFEditorImporter.IMPORT_STEP.SKIN:
                element += "Skin";

                break;
            }

            _currentStep = element;
        }
Пример #3
0
        public void UpdateProgress(UnityGLTF.GLTFEditorImporter.IMPORT_STEP step, int current, int total)
        {
            string element = "";

            switch (step)
            {
            case UnityGLTF.GLTFEditorImporter.IMPORT_STEP.BUFFER:
                element = "Buffer";
                break;

            case UnityGLTF.GLTFEditorImporter.IMPORT_STEP.IMAGE:
                element = "Image";
                break;

            case UnityGLTF.GLTFEditorImporter.IMPORT_STEP.TEXTURE:
                element = "Texture";
                break;

            case UnityGLTF.GLTFEditorImporter.IMPORT_STEP.MATERIAL:
                element = "Material";
                break;

            case UnityGLTF.GLTFEditorImporter.IMPORT_STEP.MESH:
                element = "Mesh";
                break;

            case UnityGLTF.GLTFEditorImporter.IMPORT_STEP.NODE:
                element = "Node";
                break;

            case UnityGLTF.GLTFEditorImporter.IMPORT_STEP.ANIMATION:
                element = "Animation";
                break;

            case UnityGLTF.GLTFEditorImporter.IMPORT_STEP.SKIN:
                element = "Skin";
                break;

            case UnityGLTF.GLTFEditorImporter.IMPORT_STEP.SKINNEDMESH:
                element = "SkinnedMesh";
                break;
            }

            EditorUtility.DisplayProgressBar("Importing glTF", "Importing " + element + " (" + current + " / " + total + ")", (float)current / (float)total);
            this.Repaint();
        }