From adbe16e15413408e30dc94d9dded68273c4364e0 Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Thu, 27 May 2021 15:37:38 +0900 Subject: [PATCH] mv GetTextureImportParamSet Get --- .../Editor/UniGLTF/ScriptedImporter/EditorMaterial.cs | 2 +- .../UniGLTF/ScriptedImporter/ScriptedImporterImpl.cs | 2 +- .../Editor/UniGLTF/ScriptedImporter/TextureExtractor.cs | 2 +- Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs | 2 +- .../IO/TextureIO/GltfTextureDescriptorGenerator.cs | 2 +- .../UniGLTF/IO/TextureIO/ITextureDescriptorGenerator.cs | 2 +- Assets/UniGLTF/Tests/UniGLTF/GltfLoadTests.cs | 2 +- Assets/UniGLTF/Tests/UniGLTF/TextureEnumerateTests.cs | 8 ++++---- Assets/UniGLTF/Tests/UniGLTF/TextureTests.cs | 2 +- Assets/VRM/Editor/Format/VRMImporterMenu.cs | 2 +- Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs | 2 +- Assets/VRM/Runtime/IO/VrmTextureDescriptorGenerator.cs | 2 +- Assets/VRM/Tests/VRMTextureEnumerateTests.cs | 2 +- .../Editor/ScriptedImporter/VrmScriptedImporterImpl.cs | 2 +- .../Runtime/IO/Texture/Vrm10TextureDescriptorGenerator.cs | 2 +- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/EditorMaterial.cs b/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/EditorMaterial.cs index c4c1714e5..5a252d62c 100644 --- a/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/EditorMaterial.cs +++ b/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/EditorMaterial.cs @@ -56,7 +56,7 @@ namespace UniGLTF s_foldTextures = EditorGUILayout.Foldout(s_foldTextures, "Remapped Textures"); if (s_foldTextures) { - importer.DrawRemapGUI(textureDescriptorGenerator.GetTextureImportParamSet().GetEnumerable().Select(x => x.SubAssetKey)); + importer.DrawRemapGUI(textureDescriptorGenerator.Get().GetEnumerable().Select(x => x.SubAssetKey)); } if (GUILayout.Button("Clear")) diff --git a/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/ScriptedImporterImpl.cs b/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/ScriptedImporterImpl.cs index 6f32aafe3..5d0f12d61 100644 --- a/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/ScriptedImporterImpl.cs +++ b/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/ScriptedImporterImpl.cs @@ -44,7 +44,7 @@ namespace UniGLTF using (var loader = new ImporterContext(parser, extractedObjects)) { // Configure TextureImporter to Extracted Textures. - foreach (var textureInfo in loader.TextureDescriptorGenerator.GetTextureImportParamSet().GetEnumerable()) + foreach (var textureInfo in loader.TextureDescriptorGenerator.Get().GetEnumerable()) { TextureImporterConfigurator.Configure(textureInfo, loader.TextureFactory.ExternalTextures); } diff --git a/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/TextureExtractor.cs b/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/TextureExtractor.cs index 7fe832881..a71934868 100644 --- a/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/TextureExtractor.cs +++ b/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/TextureExtractor.cs @@ -80,7 +80,7 @@ namespace UniGLTF Action> onCompleted = null) { var extractor = new TextureExtractor(parser, textureDirectory, subAssets); - foreach (var param in textureDescriptorGenerator.GetTextureImportParamSet().GetEnumerable()) + foreach (var param in textureDescriptorGenerator.Get().GetEnumerable()) { extractor.Extract(param.SubAssetKey, param); } diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs index 4c9e19f0b..323a4982f 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs @@ -183,7 +183,7 @@ namespace UniGLTF public async Task LoadTexturesAsync() { - var textures = TextureDescriptorGenerator.GetTextureImportParamSet().GetEnumerable(); + var textures = TextureDescriptorGenerator.Get().GetEnumerable(); foreach (var param in textures) { var tex = await TextureFactory.GetTextureAsync(param); diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/GltfTextureDescriptorGenerator.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/GltfTextureDescriptorGenerator.cs index 032359a16..3d46a5196 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/GltfTextureDescriptorGenerator.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/GltfTextureDescriptorGenerator.cs @@ -35,7 +35,7 @@ namespace UniGLTF m_parser = parser; } - public TextureImportParamSet GetTextureImportParamSet() + public TextureImportParamSet Get() { if (_textureImportParamSet == null) { diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/ITextureDescriptorGenerator.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/ITextureDescriptorGenerator.cs index 2efc357eb..e53847ac9 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/ITextureDescriptorGenerator.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/ITextureDescriptorGenerator.cs @@ -9,6 +9,6 @@ namespace UniGLTF /// public interface ITextureDescriptorGenerator { - TextureImportParamSet GetTextureImportParamSet(); + TextureImportParamSet Get(); } } diff --git a/Assets/UniGLTF/Tests/UniGLTF/GltfLoadTests.cs b/Assets/UniGLTF/Tests/UniGLTF/GltfLoadTests.cs index 270bfc788..d2f706fea 100644 --- a/Assets/UniGLTF/Tests/UniGLTF/GltfLoadTests.cs +++ b/Assets/UniGLTF/Tests/UniGLTF/GltfLoadTests.cs @@ -136,7 +136,7 @@ namespace UniGLTF } // should unique - var gltfTextures = new GltfTextureDescriptorGenerator(parser).GetTextureImportParamSet().GetEnumerable() + var gltfTextures = new GltfTextureDescriptorGenerator(parser).Get().GetEnumerable() .Select(x => x.SubAssetKey) .ToArray(); var distinct = gltfTextures.Distinct().ToArray(); diff --git a/Assets/UniGLTF/Tests/UniGLTF/TextureEnumerateTests.cs b/Assets/UniGLTF/Tests/UniGLTF/TextureEnumerateTests.cs index 6414a8e6e..b9a2567d1 100644 --- a/Assets/UniGLTF/Tests/UniGLTF/TextureEnumerateTests.cs +++ b/Assets/UniGLTF/Tests/UniGLTF/TextureEnumerateTests.cs @@ -207,7 +207,7 @@ namespace UniGLTF { GLTF = TwoTexture(), }; - var items = new GltfTextureDescriptorGenerator(parser).GetTextureImportParamSet().GetEnumerable().ToArray(); + var items = new GltfTextureDescriptorGenerator(parser).Get().GetEnumerable().ToArray(); Assert.AreEqual(2, items.Length); } @@ -216,7 +216,7 @@ namespace UniGLTF { GLTF = TwoTextureOneUri(), }; - var items = new GltfTextureDescriptorGenerator(parser).GetTextureImportParamSet().GetEnumerable().ToArray(); + var items = new GltfTextureDescriptorGenerator(parser).Get().GetEnumerable().ToArray(); Assert.AreEqual(1, items.Length); } @@ -225,7 +225,7 @@ namespace UniGLTF { GLTF = TwoTextureOneImage(), }; - var items = new GltfTextureDescriptorGenerator(parser).GetTextureImportParamSet().GetEnumerable().ToArray(); + var items = new GltfTextureDescriptorGenerator(parser).Get().GetEnumerable().ToArray(); Assert.AreEqual(1, items.Length); } @@ -234,7 +234,7 @@ namespace UniGLTF { GLTF = CombineMetallicSmoothOcclusion(), }; - var items = new GltfTextureDescriptorGenerator(parser).GetTextureImportParamSet().GetEnumerable().ToArray(); + var items = new GltfTextureDescriptorGenerator(parser).Get().GetEnumerable().ToArray(); Assert.AreEqual(1, items.Length); } } diff --git a/Assets/UniGLTF/Tests/UniGLTF/TextureTests.cs b/Assets/UniGLTF/Tests/UniGLTF/TextureTests.cs index e809193f4..0f9d46d04 100644 --- a/Assets/UniGLTF/Tests/UniGLTF/TextureTests.cs +++ b/Assets/UniGLTF/Tests/UniGLTF/TextureTests.cs @@ -96,7 +96,7 @@ namespace UniGLTF // extractor var extractor = new TextureExtractor(parser, UnityPath.FromUnityPath(""), context.TextureFactory.ConvertedTextures); - var m = context.TextureDescriptorGenerator.GetTextureImportParamSet().GetEnumerable() + var m = context.TextureDescriptorGenerator.Get().GetEnumerable() .FirstOrDefault(x => x.SubAssetKey.Name == "texture_1.standard"); Assert.Catch(() => extractor.Extract(m.SubAssetKey, m)); diff --git a/Assets/VRM/Editor/Format/VRMImporterMenu.cs b/Assets/VRM/Editor/Format/VRMImporterMenu.cs index 04a695bdc..df531c930 100644 --- a/Assets/VRM/Editor/Format/VRMImporterMenu.cs +++ b/Assets/VRM/Editor/Format/VRMImporterMenu.cs @@ -84,7 +84,7 @@ namespace VRM using (var context = new VRMImporterContext(parser, map)) { var editor = new VRMEditorImporterContext(context, prefabPath); - foreach (var textureInfo in editor.TextureDescriptorGenerator.GetTextureImportParamSet().GetEnumerable()) + foreach (var textureInfo in editor.TextureDescriptorGenerator.Get().GetEnumerable()) { VRMShaders.TextureImporterConfigurator.Configure(textureInfo, context.TextureFactory.ExternalTextures); } diff --git a/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs b/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs index ffd4ee0c1..415b616ba 100644 --- a/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs +++ b/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs @@ -59,7 +59,7 @@ namespace VRM using (var context = new VRMImporterContext(parser, map)) { var editor = new VRMEditorImporterContext(context, prefabPath); - foreach (var textureInfo in context.TextureDescriptorGenerator.GetTextureImportParamSet().GetEnumerable()) + foreach (var textureInfo in context.TextureDescriptorGenerator.Get().GetEnumerable()) { VRMShaders.TextureImporterConfigurator.Configure(textureInfo, context.TextureFactory.ExternalTextures); } diff --git a/Assets/VRM/Runtime/IO/VrmTextureDescriptorGenerator.cs b/Assets/VRM/Runtime/IO/VrmTextureDescriptorGenerator.cs index ac520c401..27e007b8d 100644 --- a/Assets/VRM/Runtime/IO/VrmTextureDescriptorGenerator.cs +++ b/Assets/VRM/Runtime/IO/VrmTextureDescriptorGenerator.cs @@ -18,7 +18,7 @@ namespace VRM m_vrm = vrm; } - public TextureImportParamSet GetTextureImportParamSet() + public TextureImportParamSet Get() { if (_textureImportParamSet == null) { diff --git a/Assets/VRM/Tests/VRMTextureEnumerateTests.cs b/Assets/VRM/Tests/VRMTextureEnumerateTests.cs index 5f57607db..80a9d80cf 100644 --- a/Assets/VRM/Tests/VRMTextureEnumerateTests.cs +++ b/Assets/VRM/Tests/VRMTextureEnumerateTests.cs @@ -72,7 +72,7 @@ namespace VRM }, } }; - var items = new VrmTextureDescriptorGenerator(parser, vrm).GetTextureImportParamSet().GetEnumerable().ToArray(); + var items = new VrmTextureDescriptorGenerator(parser, vrm).Get().GetEnumerable().ToArray(); Assert.AreEqual(1, items.Length); } } diff --git a/Assets/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs b/Assets/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs index 3266f9cbc..6c41ec630 100644 --- a/Assets/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs +++ b/Assets/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs @@ -101,7 +101,7 @@ namespace UniVRM10 using (var loader = new Vrm10Importer(parser, extractedObjects)) { // settings TextureImporters - foreach (var textureInfo in loader.TextureDescriptorGenerator.GetTextureImportParamSet().GetEnumerable()) + foreach (var textureInfo in loader.TextureDescriptorGenerator.Get().GetEnumerable()) { VRMShaders.TextureImporterConfigurator.Configure(textureInfo, loader.TextureFactory.ExternalTextures); } diff --git a/Assets/VRM10/Runtime/IO/Texture/Vrm10TextureDescriptorGenerator.cs b/Assets/VRM10/Runtime/IO/Texture/Vrm10TextureDescriptorGenerator.cs index 4e0d0d3b5..7b47d1c1f 100644 --- a/Assets/VRM10/Runtime/IO/Texture/Vrm10TextureDescriptorGenerator.cs +++ b/Assets/VRM10/Runtime/IO/Texture/Vrm10TextureDescriptorGenerator.cs @@ -17,7 +17,7 @@ namespace UniVRM10 m_parser = parser; } - public TextureImportParamSet GetTextureImportParamSet() + public TextureImportParamSet Get() { if (_textureImportParamSet == null) {