From 02ea223822439639e94ff2982de281ca6937c695 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Mon, 28 Nov 2022 17:06:31 +0900 Subject: [PATCH] controlRigInitialRotations = null MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 順番 * null 引き数の省略 --- .../VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs | 2 +- Assets/VRM10/Runtime/IO/Vrm10.cs | 2 +- Assets/VRM10/Runtime/IO/Vrm10Importer.cs | 4 ++-- Assets/VRM10/Tests.PlayMode/MaterialTests.cs | 2 +- Assets/VRM10/Tests/LoadTests.cs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs b/Assets/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs index 305bcccfc..1bd6e9cf4 100644 --- a/Assets/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs +++ b/Assets/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs @@ -40,7 +40,7 @@ namespace UniVRM10 var materialGenerator = GetMaterialDescriptorGenerator(renderPipeline); - using (var loader = new Vrm10Importer(result, controlRigInitialRotations: null, externalObjectMap: extractedObjects, materialGenerator: materialGenerator)) + using (var loader = new Vrm10Importer(result, externalObjectMap: extractedObjects, materialGenerator: materialGenerator)) { // settings TextureImporters foreach (var textureInfo in loader.TextureDescriptorGenerator.Get().GetEnumerable()) diff --git a/Assets/VRM10/Runtime/IO/Vrm10.cs b/Assets/VRM10/Runtime/IO/Vrm10.cs index 5f5ef9448..c6b34fbe5 100644 --- a/Assets/VRM10/Runtime/IO/Vrm10.cs +++ b/Assets/VRM10/Runtime/IO/Vrm10.cs @@ -275,7 +275,7 @@ namespace UniVRM10 throw new ArgumentNullException(nameof(vrm10Data)); } - using (var loader = new Vrm10Importer(vrm10Data, controlRigGenerationOption.ToInitialRotations(), materialGenerator: materialGenerator)) + using (var loader = new Vrm10Importer(vrm10Data, materialGenerator: materialGenerator, controlRigInitialRotations: controlRigGenerationOption.ToInitialRotations())) { // 1. Load meta information if callback was available. if (vrmMetaInformationCallback != null) diff --git a/Assets/VRM10/Runtime/IO/Vrm10Importer.cs b/Assets/VRM10/Runtime/IO/Vrm10Importer.cs index 8d42eea33..5f86c25b2 100644 --- a/Assets/VRM10/Runtime/IO/Vrm10Importer.cs +++ b/Assets/VRM10/Runtime/IO/Vrm10Importer.cs @@ -28,10 +28,10 @@ namespace UniVRM10 public Vrm10Importer( Vrm10Data vrm, - IReadOnlyDictionary controlRigInitialRotations, IReadOnlyDictionary externalObjectMap = null, ITextureDeserializer textureDeserializer = null, - IMaterialDescriptorGenerator materialGenerator = null + IMaterialDescriptorGenerator materialGenerator = null, + IReadOnlyDictionary controlRigInitialRotations = null ) : base(vrm.Data, externalObjectMap, textureDeserializer) { diff --git a/Assets/VRM10/Tests.PlayMode/MaterialTests.cs b/Assets/VRM10/Tests.PlayMode/MaterialTests.cs index 19f41039b..0dcc7b4ba 100644 --- a/Assets/VRM10/Tests.PlayMode/MaterialTests.cs +++ b/Assets/VRM10/Tests.PlayMode/MaterialTests.cs @@ -45,7 +45,7 @@ namespace UniVRM10.Test private (GameObject, IReadOnlyList) ToUnity(Vrm10Data data) { // Model => Unity - using (var loader = new Vrm10Importer(data, null)) + using (var loader = new Vrm10Importer(data)) { var loaded = loader.Load(); return (loaded.gameObject, loader.MaterialFactory.Materials); diff --git a/Assets/VRM10/Tests/LoadTests.cs b/Assets/VRM10/Tests/LoadTests.cs index ca2a4ac49..652e5a146 100644 --- a/Assets/VRM10/Tests/LoadTests.cs +++ b/Assets/VRM10/Tests/LoadTests.cs @@ -19,7 +19,7 @@ namespace UniVRM10.Test // empty thumbnail name vrm1Data.Data.GLTF.images[index].name = null; - using (var loader = new Vrm10Importer(vrm1Data, null)) + using (var loader = new Vrm10Importer(vrm1Data)) { loader.LoadAsync(new VRMShaders.ImmediateCaller()).Wait(); }