Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by JaredHays · Sep 30, 2015 at 09:06 AM · editor-scriptingscriptableobjectassetbundles

Cannot include ScriptableObject in asset bundle in Unity 5

I have a bunch of ScriptableObjects stored in the Assets folder as .asset files. Each asset contains a number of child assets, and in Unity 4 adding those assets to a bundle worked without a problem.

Example file structure:

 Assets/Scripts/ItemData.cs // Contains the ItemData class, which inherits from ScriptableObject
 Assets/Data/ItemData.asset
 - ItemData // This one is created automatically as blank template
 - item_potion // These contain serialized data for individual items
 - item_antidote
 ...

In Unity 4, I could load each individual child asset (e.g. "item_potion") by using AssetDatabase.LoadAllAssetsAtPath("Assets/Data/ItemData.asset") and passing the resulting list of Objects to the BuildPipeline bundle building functions.

In Unity 5, I run into the following problems:

  1. Selecting the parent asset (e.g. ItemData.asset) in the project view results in a blank Inspector window, which is also missing the Asset Labels subsection (the one where you can set which bundle to include an asset in).

  2. Selecting one of the child assets (e.g. item_potion) in the project view results in the ScriptableObject details appearing in the Inspector (same behavior as Unity 4), and the Asset Labels section appears, but does not contain the dropdown boxes to actually assign an asset bundle.

  3. Assigning a bundle to each of the child assets via script, by fetching their AssetImporters and setting the assetBundleName property, works for setting the bundle name on the asset, but attempting to build the actual bundle results in a warning of "Unrecognized assets cannot be included in AssetBundles". This occurs when adding the parent asset or any of the child assets, and it occurs with BuildPipeline.BuildAssetBundles() (including any of the variants that take a list of AssetBundleBuild objects).

  4. The original Unity 4 functionality does not seem to be working either, for reasons that are not clear to me at the moment.

Is there any way around this? I'm fine with setting the bundle names via script instead of the editor gui, but not being able to export the objects in a bundle is a huge problem. Currently using Unity 5.2.1, if it makes a difference.

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 Graeme-Zengami · Oct 28, 2015 at 01:17 PM 0
Share

This seems to still be the case in 5.2.2, as I am having the exact same problems... I was just looking into using asset bundles and now have hit this road block . that prevents me using them...

0 Replies

· Add your reply
  • Sort: 

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Override Asset Preview Thumbnail 1 Answer

ApplyModifiedProperties returns false 0 Answers

Why is play mode reverting my scriptableobject to a previous serialized state? 2 Answers

OnInteractivePreviewGUI multiple selection. Works but spams errors. 0 Answers

How to work with custom class (ScriptableObject) SerializedProperty? 1 Answer


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