laurenth-personal / lightmap-switching-tool

Tool that allows switching different baked lightmap sets on a unity scene at runtime.
MIT License
657 stars 88 forks source link

Failed to build. #17

Closed verveq closed 6 years ago

verveq commented 6 years ago

Good day! I'm getting this error when trying to build the scene:

LightsBakingSettings.cs(15,14): error CS1061: Type UnityEngine.Light' does not contain a definition forlightmapBakeType' and no extension method lightmapBakeType' of typeUnityEngine.Light' could be found.

How to get around this issue? (Unity 2017.3.0f3)

BANZBOWINKEL commented 6 years ago

Hey, I disabled the script and it worked. I am quite a noob though if it comes to programming and cannot judge if I harmed anything. But it did the trick for me...

laurenth-personal commented 6 years ago

Hi, thanks for letting me know. The "lightmapBakeType" is indeed an editor only data so I should add a #if UNITY_EDITOR before this line. I'll do that and close this issue when it's fixed. Commenting out the line might work in some cases but probably breaks some features.

laurenth-personal commented 6 years ago

So I looked it up and indeed this file "LightsBakingSettings" was a test and isn't doing anything in its current state so it can be completely deleted. I'll delete it from the repo soon.

laurenth-personal commented 6 years ago

This should be fixed in the latest version. Thanks for reporting it :)