Skip to content

Commit

Permalink
fix light import color space
Browse files Browse the repository at this point in the history
  • Loading branch information
hybridherbst committed Sep 5, 2023
1 parent e6e5270 commit 3640b03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 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
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit 3640b03

Please sign in to comment.