Find Source of Prefab Instance in Editor?

Hi All,

I’m currently trying to implement some editor functionality for level creation. The intent is to create sections of the level using Prefabs of environmental objects, etc. When these sections are done, export them out into a scriptable object recording the basic transforms data of said environmental Prefab instances.

After which, I need to recreate the level using those scriptable objects data. As such, my current thought is I need the ability to know what Prefabs to spawn back out. Is there any way to find out the source of Prefab Instances in the editor?

Side Note:
You might ask why bother with scriptable objects in the first place? Why not just Prefab the whole section? I might be wrong here… But I was hoping theoretically, I could save filesize and processing by eliminating overheads involved with storing large Prefabs of many gameobjects.

Cheers

I think you’re looking for Unity - Scripting API: PrefabUtility.GetPrefabInstanceHandle

Edit: Nah, apparently more like