Auto-export to asset only files and such used in scene

Instead of having to manually select which materials to export to asset, is there a way to reference/include only the ones actually used in a particular scene?

more ▼

asked May 16, 2011 at 09:54 PM

avatar image

5k 1641 1290 1341

I would like to know this too...

Jan 25, 2013 at 02:45 PM TouchTiltGames
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

What do you mean "export to asset"? An asset is any individual "thing" in Unity, you can't export to that. A prefab is a predefined hierarchy of assets, a package is a selection of assets you can export and import from the Unity editor, and an AssetBundle is a collection of assets you can export/load/stream on-the-fly during game mode and in builds.

To answer your question - as far as I understand it - just right click on your scene in the Project tab, and select "export to package", it will automatically select all dependencies, i.e. stuff that this scene uses/references (although it will not include base classes of used scripts).

To get a selection of dependency assets via (editor) script, supply the asset path of your scene to AssetDatabase.GetDependencies().

EDIT: argh, somebody bumped this ancient question. Well, I hope at least my answer helps him...

more ▼

answered Jan 25, 2013 at 02:53 PM

avatar image

11.4k 26 89 89

Helped me! Thanks a lot :)

Jul 11, 2013 at 07:41 PM Essential

Great! Helpe me too. Thanks a lot!

Dec 01, 2014 at 04:55 AM JadsonAlmeida
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: May 16, 2011 at 09:54 PM

Seen: 2774 times

Last Updated: Dec 01, 2014 at 04:55 AM