Ayfel / PrefabLightmapping

Script for saving lightmapping data to prefabs. Used through the Assets tab in Unity. Place your prefbas in the scene with this script at the root. Set up your lighting and in the editor go to Assets->Bake Prefab Lightmaps. After is processed you can now spawn your prefabs in different scenes and they will use the lightmapping from the original scene.
624 stars 89 forks source link

Unable to view reflection probes lights #19

Closed ShaziyaXR closed 3 years ago

ShaziyaXR commented 3 years ago

I am trying to take the data of reflection probe but the script has not one i guess.

Ayfel commented 3 years ago

Hi @ShaziyaXR , for reflection probes I recommend making them custom and adding them to the prefab and baking them which stores their Cubemap in your project (I might add this in the future as well, but it is not necessary for it to work like I mentioned)

As for light probes unfortunately it is not possible to save light probes to prefabs due to how they are calculated and store in scene lighting data asset. However it is possible to calculate light probes at runtime, which can be leveraged to create a similar effect. This is not a feature that I have published yet as it is different from the functionality of this project and requires a bit more planning from the user. I have a script that takes the light probes in users prefabs (as well as the lights which have to be then included in the prefab) and calculates them at runtime. I am planning to add this to the project in the future but I have not a defined timeline yet since I want to think a bit on the best workflow.

ShaziyaXR commented 3 years ago

Thanks. But if this project has the reflection probes concept . I feel this would be amazing. Your code helped alot . thanks again.