Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by ina · May 16, 2011 at 09:54 PM · editorassetexportide

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?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Shizzane · Jan 25, 2013 at 02:45 PM 0
Share

I would like to know this too...

2 Replies

· Add your reply
  • Sort: 
avatar image
15

Answer by smbv · Jun 03, 2015 at 09:06 AM

To export your scene (level) just clean, you have to go to the Project window - select there you level and right click and select: "Select dependencies" it will show you summary information about your level files which was used only in that scene, then you have to go top menu: Assets -> Export Package and UNCHECK include dependencies and it the window you'll see it's only selected stuff from your scene and then you can click Okay and save your scene just with stuff you had in that scene.

Include Dependencies - should have to be renamed: "Include all garbage from entire unity projects".

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Wolfram · Jun 03, 2015 at 10:04 AM 1
Share

Yeah, as the original Dependency selection was incapable of selecting (and thus exporting) base classes of derived classes that were actually used (see my answer above), as well as global classes that were not referenced in the scene directly, their "solution" in >=4.x was to simply dump ALL scripts in the whole project. It ensures that your packages is complete - but it rarely is what you want...

The "Select Dependencies" trick still emulates the "old" behaviour of <4.x, but you will run into the danger of missing scripts if you (or any of the Asset Store packages in your project) use any form of class inheritance.

avatar image eco_bach · Feb 03, 2016 at 03:35 PM 0
Share

THIS is the correct answer. However. how to include dependent and linked scripts is another matter.

avatar image Aldrick · Mar 31, 2017 at 02:44 AM 0
Share

Correct one.

avatar image NatCou · Jun 15, 2019 at 11:28 AM 0
Share

Was helpful... but still struggling with missing dependent and linked scripts... At least partway there :)

avatar image
5

Answer by Wolfram · Jan 25, 2013 at 02:53 PM

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...

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Essential · Jul 11, 2013 at 07:41 PM 0
Share

Helped me! Thanks a lot :)

avatar image JadsonAlmeida · Dec 01, 2014 at 04:55 AM 0
Share

Great! Helpe me too. Thanks a lot!

avatar image eco_bach · Feb 03, 2016 at 03:32 PM 1
Share

Sorry, but doing this for me exports the ENTIRE project.

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Export Settings or custom files to release builds 1 Answer

How can I detect an Asset been deleted in Editor by script? 1 Answer

Custom editor DLLs 1 Answer

Set script global variable value priority over editor values 1 Answer

Duplicated Terrain Object and Data STILL affects other terrains 4 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges