WurstModders / WurstMod

Deli mod for H3VR to load custom scenes into the game!
MIT License
24 stars 2 forks source link

Unable to include baked lighting #3

Closed devyndamonster closed 4 years ago

devyndamonster commented 4 years ago

Currently, it seems like this mod is unable to export a map with baked lighting included. When I try to export with baked lighting, it says that all child objects must be a child of the [Level] object, and when I clear the baked lighting data it is able to export just fine.

Am I missing something? Is it possible to have baked lighting, and I'm just doing it wrong? And if not, then is that something that can be added?

Nolenz commented 4 years ago

The only reason that error would show up is if there's another GameObject created by baked lighting, and I didn't think there was. Check your scene hierarchy to make sure the only top-level object is [LEVEL] (or attach your assets folder and I can look into it myself.)

I did some brief experimentation with baked lighting and I am unable to reproduce that exact error message. I can at least get things to export, but the lightmaps aren't properly added to the assetbundles (or they aren't loaded properly? Hard to tell.)

Super quick search and I'd say there's about a 50% chance this is just an old Unity assetbundle bug, but I can't find anything conclusive.

I'll spend a bit more time exploring baked lighting at some point, but it's currently looking a bit iffy.

devyndamonster commented 4 years ago

For anyone having trouble with baked lighting, or issues with the mod complaining about scene hierarchy, make sure that there are't any gameobjects hidden in hierarchy. You can see more on this issue here: https://answers.unity.com/questions/1291622/object-in-scene-not-in-hierarchy.html

Basically, the tool I was using to bake lighting was creating an invisible gameobject that I couldn't normaly see. Using the script provided in that unity forum post, you can make sure all hidden objects are under the [Level] object