mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
dont use CopyPropertiesFrom for star light stuff
This commit is contained in:
parent
01b8ac0b7a
commit
789926d012
@ -178,14 +178,11 @@ namespace NewHorizons.Builder.Body
|
|||||||
light.color = lightColour;
|
light.color = lightColour;
|
||||||
ambientLight.color = new Color(lightColour.r, lightColour.g, lightColour.b, lightColour.a == 0 ? 0.0001f : lightColour.a);
|
ambientLight.color = new Color(lightColour.r, lightColour.g, lightColour.b, lightColour.a == 0 ? 0.0001f : lightColour.a);
|
||||||
|
|
||||||
|
// used to use CopyPropertiesFrom, but that doesnt work here. instead, just copy sun props from unity explorer
|
||||||
var faceActiveCamera = sunLight.AddComponent<FaceActiveCamera>();
|
var faceActiveCamera = sunLight.AddComponent<FaceActiveCamera>();
|
||||||
faceActiveCamera.CopyPropertiesFrom(_sunLight.GetComponent<FaceActiveCamera>());
|
faceActiveCamera._useLookAt = true;
|
||||||
var csmTextureCacher = sunLight.AddComponent<CSMTextureCacher>();
|
var csmTextureCacher = sunLight.AddComponent<CSMTextureCacher>();
|
||||||
csmTextureCacher.CopyPropertiesFrom(_sunLight.GetComponent<CSMTextureCacher>());
|
|
||||||
csmTextureCacher._light = light;
|
|
||||||
var proxyShadowLight = sunLight.AddComponent<ProxyShadowLight>();
|
var proxyShadowLight = sunLight.AddComponent<ProxyShadowLight>();
|
||||||
proxyShadowLight.CopyPropertiesFrom(_sunLight.GetComponent<ProxyShadowLight>());
|
|
||||||
proxyShadowLight._light = light;
|
|
||||||
|
|
||||||
sunLight.name = "StarLight";
|
sunLight.name = "StarLight";
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user