diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs index ca9a8ac17..f46085f50 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs @@ -344,7 +344,7 @@ namespace UniGLTF { foreach (var x in Meshes) { - UnityObjectDestroyer.DestroyRuntimeOrEditor(x.Mesh); + UnityObjectDestoyer.DestroyRuntimeOrEditor(x.Mesh); } Meshes.Clear(); diff --git a/Assets/UniGLTF/Runtime/UniGLTF/RuntimeGltfInstance.cs b/Assets/UniGLTF/Runtime/UniGLTF/RuntimeGltfInstance.cs index 25b63dd1d..57b9cefe2 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/RuntimeGltfInstance.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/RuntimeGltfInstance.cs @@ -171,7 +171,7 @@ namespace UniGLTF Debug.Log("UnityResourceDestroyer.OnDestroy"); foreach (var (_, obj) in _resources) { - UnityObjectDestroyer.DestroyRuntimeOrEditor(obj); + UnityObjectDestoyer.DestroyRuntimeOrEditor(obj); } } @@ -188,7 +188,7 @@ namespace UniGLTF { if (this != null && this.gameObject != null) { - UnityObjectDestroyer.DestroyRuntimeOrEditor(this.gameObject); + UnityObjectDestoyer.DestroyRuntimeOrEditor(this.gameObject); } } } diff --git a/Assets/VRM/Editor/Format/VRMEditorImporterContext.cs b/Assets/VRM/Editor/Format/VRMEditorImporterContext.cs index 0c76bbbdf..1e3c15823 100644 --- a/Assets/VRM/Editor/Format/VRMEditorImporterContext.cs +++ b/Assets/VRM/Editor/Format/VRMEditorImporterContext.cs @@ -148,7 +148,7 @@ namespace VRM var root = loaded.Root; // Remove RuntimeGltfInstance component before saving as a prefab. - UnityObjectDestroyer.DestroyRuntimeOrEditor(loaded); + UnityObjectDestoyer.DestroyRuntimeOrEditor(loaded); // Create or update Main Asset if (m_prefabPath.IsFileExists) @@ -164,7 +164,7 @@ namespace VRM } // destroy GameObject on scene - UnityObjectDestroyer.DestroyRuntimeOrEditor(root); + UnityObjectDestoyer.DestroyRuntimeOrEditor(root); foreach (var x in m_paths) { diff --git a/Assets/VRM/Runtime/IO/VRMImporterContext.cs b/Assets/VRM/Runtime/IO/VRMImporterContext.cs index cff816329..e34edc97c 100644 --- a/Assets/VRM/Runtime/IO/VRMImporterContext.cs +++ b/Assets/VRM/Runtime/IO/VRMImporterContext.cs @@ -361,23 +361,23 @@ namespace VRM // VRM specific if (HumanoidAvatar != null) { - UnityObjectDestroyer.DestroyRuntimeOrEditor(HumanoidAvatar); + UnityObjectDestoyer.DestroyRuntimeOrEditor(HumanoidAvatar); } if (Meta != null) { - UnityObjectDestroyer.DestroyRuntimeOrEditor(Meta); + UnityObjectDestoyer.DestroyRuntimeOrEditor(Meta); } if (AvatarDescription != null) { - UnityObjectDestroyer.DestroyRuntimeOrEditor(AvatarDescription); + UnityObjectDestoyer.DestroyRuntimeOrEditor(AvatarDescription); } if (BlendShapeAvatar != null) { foreach (var clip in BlendShapeAvatar.Clips) { - UnityObjectDestroyer.DestroyRuntimeOrEditor(clip); + UnityObjectDestoyer.DestroyRuntimeOrEditor(clip); } - UnityObjectDestroyer.DestroyRuntimeOrEditor(BlendShapeAvatar); + UnityObjectDestoyer.DestroyRuntimeOrEditor(BlendShapeAvatar); } base.Dispose(); diff --git a/Assets/VRM10/Runtime/IO/Vrm10.cs b/Assets/VRM10/Runtime/IO/Vrm10.cs index 721f64b8b..bf9c74ee4 100644 --- a/Assets/VRM10/Runtime/IO/Vrm10.cs +++ b/Assets/VRM10/Runtime/IO/Vrm10.cs @@ -139,7 +139,7 @@ namespace UniVRM10 { if (ct.IsCancellationRequested) { - UnityObjectDestroyer.DestroyRuntimeOrEditor(instance.gameObject); + UnityObjectDestoyer.DestroyRuntimeOrEditor(instance.gameObject); ct.ThrowIfCancellationRequested(); } return instance; @@ -164,7 +164,7 @@ namespace UniVRM10 { if (ct.IsCancellationRequested) { - UnityObjectDestroyer.DestroyRuntimeOrEditor(migratedInstance.gameObject); + UnityObjectDestoyer.DestroyRuntimeOrEditor(migratedInstance.gameObject); ct.ThrowIfCancellationRequested(); } return migratedInstance; diff --git a/Assets/VRM10/Runtime/IO/Vrm10Importer.cs b/Assets/VRM10/Runtime/IO/Vrm10Importer.cs index 1a430086c..31b6ae002 100644 --- a/Assets/VRM10/Runtime/IO/Vrm10Importer.cs +++ b/Assets/VRM10/Runtime/IO/Vrm10Importer.cs @@ -821,19 +821,19 @@ namespace UniVRM10 // VRM specific if (m_humanoid != null) { - UnityObjectDestroyer.DestroyRuntimeOrEditor(m_humanoid); + UnityObjectDestoyer.DestroyRuntimeOrEditor(m_humanoid); m_humanoid = null; } if (m_vrmObject != null) { - UnityObjectDestroyer.DestroyRuntimeOrEditor(m_vrmObject); + UnityObjectDestoyer.DestroyRuntimeOrEditor(m_vrmObject); m_vrmObject = null; } foreach (var (preset, clip) in m_expressions) { - UnityObjectDestroyer.DestroyRuntimeOrEditor(clip); + UnityObjectDestoyer.DestroyRuntimeOrEditor(clip); } m_expressions.Clear(); diff --git a/Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerUI.cs b/Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerUI.cs index 6bc7142c1..f298c0d83 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerUI.cs +++ b/Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerUI.cs @@ -336,7 +336,7 @@ namespace UniVRM10.VRM10Viewer ct: cancellationToken); if (cancellationToken.IsCancellationRequested) { - UnityObjectDestroyer.DestroyRuntimeOrEditor(vrm10Instance.gameObject); + UnityObjectDestoyer.DestroyRuntimeOrEditor(vrm10Instance.gameObject); cancellationToken.ThrowIfCancellationRequested(); } diff --git a/Assets/VRMShaders/GLTF/IO/Runtime/Animation/Importer/AnimationClipFactory.cs b/Assets/VRMShaders/GLTF/IO/Runtime/Animation/Importer/AnimationClipFactory.cs index d570b7df2..b6ff3fa92 100644 --- a/Assets/VRMShaders/GLTF/IO/Runtime/Animation/Importer/AnimationClipFactory.cs +++ b/Assets/VRMShaders/GLTF/IO/Runtime/Animation/Importer/AnimationClipFactory.cs @@ -37,7 +37,7 @@ namespace VRMShaders { foreach (var kv in _runtimeClips) { - UnityObjectDestroyer.DestroyRuntimeOrEditor(kv.Value); + UnityObjectDestoyer.DestroyRuntimeOrEditor(kv.Value); } _runtimeClips.Clear(); } diff --git a/Assets/VRMShaders/GLTF/IO/Runtime/Material/Importer/MaterialFactory.cs b/Assets/VRMShaders/GLTF/IO/Runtime/Material/Importer/MaterialFactory.cs index 6e01ffea4..6c6c39e4a 100644 --- a/Assets/VRMShaders/GLTF/IO/Runtime/Material/Importer/MaterialFactory.cs +++ b/Assets/VRMShaders/GLTF/IO/Runtime/Material/Importer/MaterialFactory.cs @@ -58,7 +58,7 @@ namespace VRMShaders #if VRM_DEVELOP // Debug.Log($"Destroy {x.Asset}"); #endif - UnityObjectDestroyer.DestroyRuntimeOrEditor(x.Asset); + UnityObjectDestoyer.DestroyRuntimeOrEditor(x.Asset); } } } diff --git a/Assets/VRMShaders/GLTF/IO/Runtime/Texture/Importer/TextureFactory.cs b/Assets/VRMShaders/GLTF/IO/Runtime/Texture/Importer/TextureFactory.cs index 0a3556eee..68a80c458 100644 --- a/Assets/VRMShaders/GLTF/IO/Runtime/Texture/Importer/TextureFactory.cs +++ b/Assets/VRMShaders/GLTF/IO/Runtime/Texture/Importer/TextureFactory.cs @@ -114,8 +114,8 @@ namespace VRMShaders // したがって合成後の Texture に Sampler Param を設定する必要があるが、エッジケースで不整合な結果になる可能性がある. combinedTexture.SetSampler(texDesc.Sampler); _textureCache.Add(subAssetKey, combinedTexture); - UnityObjectDestroyer.DestroyRuntimeOrEditor(metallicRoughnessTexture); - UnityObjectDestroyer.DestroyRuntimeOrEditor(occlusionTexture); + UnityObjectDestoyer.DestroyRuntimeOrEditor(metallicRoughnessTexture); + UnityObjectDestoyer.DestroyRuntimeOrEditor(occlusionTexture); return combinedTexture; } diff --git a/Assets/VRMShaders/GLTF/IO/Runtime/Util/UnityObjectDestroyer.cs b/Assets/VRMShaders/GLTF/IO/Runtime/Util/UnityObjectDestroyer.cs index bf5df6e9f..d35cffc54 100644 --- a/Assets/VRMShaders/GLTF/IO/Runtime/Util/UnityObjectDestroyer.cs +++ b/Assets/VRMShaders/GLTF/IO/Runtime/Util/UnityObjectDestroyer.cs @@ -2,7 +2,7 @@ using UnityEngine; namespace VRMShaders { - public static class UnityObjectDestroyer + public static class UnityObjectDestoyer { public static void DestroyRuntimeOrEditor(UnityEngine.Object o) {