Isolating scene

Suppose i need to isolate certain scene in the project. Is there some tool that will tell me each material, prefab, model and script scene is using so it can be easily isolated (granted, that probably wouldn’t save you from dynamic loading using Find methods or loading from Resources folder, unless tool will analyze scripts as well, but would make job much easier).

Select the scene and click export?

That doesn’t care about all the references. I’ve did that, loaded into empty project and it was utterly broken.

Exporting a package of the scene should work, make sure you have include dependencies checked.

It will try and bring all of your scripts. Problem is that because of reflection and the like script dependencies on each other are hard to analyse statically.

1 Like

You can right-click a scene asset in the Project window, and then from the context menu, select “Select Dependencies”.

This selects all the dependencies that this scene has. You can then copy these into a specific folder, or do whatever you want with it.

  • Not sure if this is 100% bullet-proof. Never tested it myself.

This. It is the quickest way.

I wrote some editor analytic tools that parse the hiearchy to determine what is present, it can find script references, but struggles a bit with scriptable objects. The solution for prefabs was to instantiate, parse and destroy. If there complex or many prefab (especially ones that instanciate things themselves) it takes a while to run. But usually the quickest way is to just export.