From 537cfe55bea64cfa57b62b7fc5ae78ab3f2cab9b Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Mon, 10 May 2021 19:59:19 +0900 Subject: [PATCH] Add RenderQueue to MaterialImportParam --- Assets/VRMShaders/GLTF/IO/Runtime/MaterialFactory.cs | 5 +++++ Assets/VRMShaders/GLTF/IO/Runtime/MaterialImportParam.cs | 1 + 2 files changed, 6 insertions(+) diff --git a/Assets/VRMShaders/GLTF/IO/Runtime/MaterialFactory.cs b/Assets/VRMShaders/GLTF/IO/Runtime/MaterialFactory.cs index 8ef4afe1b..d566f780a 100644 --- a/Assets/VRMShaders/GLTF/IO/Runtime/MaterialFactory.cs +++ b/Assets/VRMShaders/GLTF/IO/Runtime/MaterialFactory.cs @@ -144,6 +144,11 @@ namespace VRMShaders material.SetFloat(kv.Key, kv.Value); } + if (param.RenderQueue.HasValue) + { + material.renderQueue = param.RenderQueue.Value; + } + foreach(var action in param.Actions) { action(material); diff --git a/Assets/VRMShaders/GLTF/IO/Runtime/MaterialImportParam.cs b/Assets/VRMShaders/GLTF/IO/Runtime/MaterialImportParam.cs index b0676f804..e6d895ccc 100644 --- a/Assets/VRMShaders/GLTF/IO/Runtime/MaterialImportParam.cs +++ b/Assets/VRMShaders/GLTF/IO/Runtime/MaterialImportParam.cs @@ -13,6 +13,7 @@ namespace VRMShaders public readonly Dictionary FloatValues = new Dictionary(); public readonly Dictionary Colors = new Dictionary(); public readonly Dictionary Vectors = new Dictionary(); + public int? RenderQueue; public readonly List> Actions = new List>(); public MaterialImportParam(string name, string shaderName)