Skip to content

Commit 9f115c6

Browse files
committed
lights: Add pyramid spot support.
1 parent 50de2a4 commit 9f115c6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Runtime/LightConverter.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,15 @@ public void SpotLight(Light light, float outer, float innerPercent)
7272
hdLight.SetSpotAngle(outer, innerPercent);
7373
}
7474
}
75+
76+
public void PyramidAngle(Light light, float angle, float aspectRatio)
77+
{
78+
var hdLight = light.GetComponent<HDAdditionalLightData>();
79+
if (hdLight != null) {
80+
hdLight.spotLightShape = SpotLightShape.Pyramid;
81+
hdLight.SetSpotAngle(angle);
82+
hdLight.aspectRatio = aspectRatio;
83+
}
84+
}
7585
}
7686
}

0 commit comments

Comments
 (0)