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.
645 stars 90 forks source link

Save the info in script to another file #30

Closed highwaywarrior0 closed 3 years ago

highwaywarrior0 commented 3 years ago

Can you make the attached script on root prefab save info in another file?(something like txt)

This image We really need this and i can explain why if you want.

Ayfel commented 3 years ago

Hi, I don't follow, save what info? And what is the purpose?

highwaywarrior0 commented 3 years ago

We are modding a game with AssetBundles, but we cant include scripts in AssetBundles. We can compile the script into a .dll and attach it to the prefab again but it wont have lightmap info.

But if you make your script save these lightmap data info into a file, we can attach the script with that info. Do you understand what i mean by info now?

Ayfel commented 3 years ago

I see, I don't have much experience referencing things inside Assetbundles and it really falls out of the scope of the project by a fair bit. I assume you have no access to the end game to include this script in an update? that would eliminate any need to do what you mention

highwaywarrior0 commented 3 years ago

We can include the script in a dll and attach it to objects at runtime, but will the objects keep the information while building AssetBundles? The info in attached script, stuff like which objects use which lightmaps