public static GameObject CreateStage(string path, string shader = "Deferred Physical")
        {
            var obj = importedObjects.FindValue((i) => i.Path == path);

            if (obj == null)
            {
                var imp = MMW.GetSupportedImporter(path);
                obj = imp.Import(path, Importers.ImportType.Full)[0];

                foreach (var tex in obj.Textures)
                {
                    if (tex != null)
                    {
                        tex.Load();
                    }
                }
                foreach (var mesh in obj.Meshes)
                {
                    mesh.Load();
                }

                importedObjects.Add(path, obj);
            }
            var sh = MMW.GetAsset <Shader>(shader);

            foreach (var mat in obj.Materials)
            {
                mat.Shader = sh;
            }

            var go = new GameObject(obj.Name);

            for (var i = 0; i < obj.Meshes.Length; i++)
            {
                var mr = go.AddComponent <MeshRenderer>();
                mr.ForceRendering = true;
                mr.Mesh           = obj.Meshes[i];
                for (var m = 0; m < mr.Mesh.SubMeshCount; m++)
                {
                    var matIndex = mr.Mesh.GetMaterialIndex(m);
                    mr.SetMaterial(matIndex, obj.Materials[matIndex], false);
                }
            }

            for (var i = 0; i < obj.Meshes.Length; i++)
            {
                go.AddComponent <MeshCollider>(obj.Meshes[i]);
            }

            return(go);
        }
        public static GameObject CreateMeshObject(string path, string shader = "Physical")
        {
            var obj = importedObjects.FindValue((i) => i.Path == path);

            if (obj == null)
            {
                var imp = MMW.GetSupportedImporter(path);
                obj = imp.Import(path, Importers.ImportType.Full)[0];

                if (obj.Textures != null)
                {
                    foreach (var tex in obj.Textures)
                    {
                        if (tex != null)
                        {
                            tex.Load();
                        }
                    }
                }
                if (obj.Meshes != null)
                {
                    foreach (var mesh in obj.Meshes)
                    {
                        if (mesh != null)
                        {
                            mesh.Load();
                        }
                    }
                }

                importedObjects.Add(path, obj);
            }
            var sh = MMW.GetAsset <Shader>(shader);

            if (sh == null)
            {
                sh = MMW.GetAsset <Shader>("Error");
            }
            foreach (var mat in obj.Materials)
            {
                mat.Shader = sh;
            }

            var go = new GameObject(obj.Name);

            // bone
            if (obj.Bones != null && obj.Bones.Length > 0)
            {
                CreateBoneObject(go.Transform, new Bone[] { obj.Bones[0] });
            }

            if (obj.Meshes != null)
            {
                for (var i = 0; i < obj.Meshes.Length; i++)
                {
                    var mr = go.AddComponent <MeshRenderer>();
                    mr.Bones = obj.Bones;
                    mr.Mesh  = obj.Meshes[i];
                    for (var m = 0; m < mr.Mesh.SubMeshCount; m++)
                    {
                        var matIndex = mr.Mesh.GetMaterialIndex(m);
                        mr.SetMaterial(matIndex, obj.Materials[matIndex], false);
                    }
                }
            }

            if (obj.Morphs != null)
            {
                var morpher = go.AddComponent <ComputeMorpher>();

                foreach (var m in obj.Morphs)
                {
                    if (m == null)
                    {
                        continue;
                    }
                    morpher.AddMorph(m.Name, m);
                }
            }

            return(go);
        }