From 3640b03d19500c53aca1213d2e2cd6b9601011c0 Mon Sep 17 00:00:00 2001 From: Felix Herbst Date: Tue, 5 Sep 2023 21:57:43 +0200 Subject: [PATCH] fix light import color space --- Runtime/Scripts/SceneImporter/ImporterLights.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Runtime/Scripts/SceneImporter/ImporterLights.cs b/Runtime/Scripts/SceneImporter/ImporterLights.cs index cf19a547b..1f4362e4b 100644 --- a/Runtime/Scripts/SceneImporter/ImporterLights.cs +++ b/Runtime/Scripts/SceneImporter/ImporterLights.cs @@ -1,6 +1,7 @@ using GLTF.Schema; using GLTF.Schema.KHR_lights_punctual; using UnityEngine; +using UnityGLTF.Extensions; using LightType = UnityEngine.LightType; namespace UnityGLTF @@ -35,7 +36,7 @@ private void ConstructLights(GameObject nodeObj, Node node) newLight.name = light.Name; newLight.intensity = (float) light.Intensity / Mathf.PI; - newLight.color = new Color(light.Color.R, light.Color.G, light.Color.B, light.Color.A); + newLight.color = light.Color.ToUnityColorRaw(); newLight.range = (float) light.Range; if (light.Spot != null) {