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 BigBulle · Aug 03, 2011 at 05:26 PM · assetbundlecreation

AssetBundle Creation Problem

Hello,

I have a script that creates a prefab in order to create an AssetBundle from it (this part of the Unity API is really a mess!!!).

My script runs perfectly the first time but crash with the following error the second time:

 Inconsistent asset when sorting preload assets: '' fileID: 0
 UnityEditor.BuildPipeline:BuildAssetBundleInternal(Object, Object[], String[], String, BuildAssetBundleOptions, BuildTarget)
 UnityEditor.BuildPipeline:BuildAssetBundle(Object, Object[], String, BuildAssetBundleOptions, BuildTarget) (at C:\BuildAgent\work\842f9557127e852\Editor\MonoGenerated\Editor\BuildPipeline.cs:55)

Here a the code I use to create the AssetBundle:

 var prefab = EditorUtility.CreateEmptyPrefab("myPrefab.prefab");
         EditorUtility.ReplacePrefab(myObject.gameObject, prefab, ReplacePrefabOptions.ConnectToPrefab);
         AssetDatabase.Refresh();
         BuildPipeline.BuildAssetBundle(AssetDatabase.LoadMainAssetAtPath("myPrefab.prefab"), null, "myBundle.unity3d", BuildAssetBundleOptions.CollectDependencies | BuildAssetBundleOptions.CompleteAssets, BuildTarget.StandaloneWindows64);
         AssetDatabase.Refresh();

My gameobject is a simple Asset model in my project.

If you have any clue please share ;-)!

Thx

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by BigBulle · Aug 03, 2011 at 08:54 PM

I think that the reason of my problem was that the second time, I was creating an AssetBundle of a prefab created from an AssetBundle... I've changed my design to not do that. And now it works...

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

Answer by Lermy KefSensei · Jul 08, 2015 at 09:00 AM

Perhaps you are having the same issue from this post. Hope it helps!

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

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

How to import the object from server to unity 2 Answers

Load 3D model from external drive in runtime without using Assetbundle ? 1 Answer

How to auto find a component inside an assembly (dll)? 0 Answers

Load scene with navmesh from asset bundle 1 Answer

apply texture on OBJ files automatically in batchmode 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