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
1
Question by AceTrip_RecapIt · Jun 05, 2012 at 10:26 AM · errorexportresourcesassetbundlesbuildpipeline

Message error : BuildPipeline.BuildAssetBundle

Hi Everybody, Does someone know this message ? what causes this?

m_ManagersToReset.empty() UnityEditor.BuildPipeline:BuildAssetBundle(Object, Object[], String, BuildAssetBundleOptions)

I got it on this example project to better understand the assetbundles and the buildpipeline at the following link:

http://unity3d.com/support/resources/example-projects/assetbundles

Could it be explained by the fact that i clicked on "Assets/Auto Build Resource Files" while in runtime ? And so why does runtime generate this error ?

Thank you for any answers.

PS: here is the code:

 @MenuItem("Assets/Auto Build Resource Files")
 static function ExportResource () {
 
     System.IO.Directory.CreateDirectory("AssetBundles");
 
     var options = BuildAssetBundleOptions.CollectDependencies | BuildAssetBundleOptions.CompleteAssets;
     BuildPipeline.PushAssetDependencies();
     
     
 
     // All subsequent resources share assets in this resource file
     // It is up to you to ensure that the shared resource file is loaded prior to loading other resources
     BuildPipeline.BuildAssetBundle(AssetDatabase.LoadMainAssetAtPath("Assets/artwork/lerpzuv.tif"), null, "AssetBundles/Shared.unity3d", options);    
 
     // By pushing and popping around the resource file, this file will share resources but later resource files will not share assets in this resource
     BuildPipeline.PushAssetDependencies();
     
     BuildPipeline.BuildAssetBundle(AssetDatabase.LoadMainAssetAtPath("Assets/Artwork/Lerpz.fbx"), null, "AssetBundles/Lerpz.unity3d", options);    
 
     BuildPipeline.PopAssetDependencies();
 
     // By pushing and popping around the resource file, this file will share resources but later resource files will not share assets in this resource
     BuildPipeline.PushAssetDependencies();
 
     BuildPipeline.BuildAssetBundle(AssetDatabase.LoadMainAssetAtPath("Assets/Artwork/explosive guitex.prefab"), null, "AssetBundles/explosive.unity3d", options);    
 
     BuildPipeline.PopAssetDependencies();
 
     // By pushing and popping around the resource file, this file will share resources but later resource files will not share assets in this resource
     BuildPipeline.PushAssetDependencies();
 
     // Build streamed scene file into a seperate unity3d file
     BuildPipeline.BuildPlayer(["Assets/AdditiveScene.unity"], "AssetBundles/AdditiveScene.unity3d", BuildTarget.WebPlayer, BuildOptions.BuildAdditionalStreamedScenes);    
 
     BuildPipeline.PopAssetDependencies();
     
     BuildPipeline.PopAssetDependencies();
     
     BuildPipeline.BuildPlayer(["Assets/Loader.unity"], "loader.unity3d", BuildTarget.WebPlayer, BuildOptions.Development);
 }


Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by AceTrip_RecapIt · Jun 06, 2012 at 04:25 PM

No comments ? OK perharps it was stupid question ... I found by myself anyway. So it seems that using BuildPipeline.BuildAssetBundle while the scene is in playing mode causes this message:

m_ManagersToReset.empty() UnityEditor.BuildPipeline:BuildAssetBundle(Object, Object[], String, BuildAssetBundleOptions)

To avoid that, just create a C# or js script in a folder that you created and named Editor then use the word static for each function and add the MenuItem stuff at the head of your function.

 [MenuItem("Assets/nameUpToYou")]
 static function ExportResource () 
 {
     ...
 }

Now you have just to click on Assets > nameUpToYou and you also call your script in editor mode.

Hoping it will help you.

Comment
Add comment · Show 2 · 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 Jaroslav-Stehlik · Jan 04, 2014 at 08:16 PM 0
Share

I need to call that function from InspectorOnGUI thread not from the menu during Play $$anonymous$$ode Is it possible to prevent somehow the error ?

avatar image CHPedersen · Aug 11, 2014 at 08:01 AM 0
Share

It was not at all a stupid question. I found this by Googling the error and your question+reply helped me understand it's a play-mode thing and I don't need to worry about it. :)

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Error uploading assets 0 Answers

error CS0117: `Resources' does not contain a definition for `Load' 1 Answer

Can't export game to WebGL??? | Failed running InternalCallRegistrationWriter.exe ? 0 Answers

Cloud Diagnostics (formerly Performance Reporting) doesn't track an error when I build it before with Jenkins. 0 Answers

Error Compressing TAR when exporting package 2 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