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 xexijreil · Oct 26, 2015 at 06:54 PM · errorbuildassetbundletrees

Cannot build asset bundle of a terrain with trees placed

Hi,

I'm quite newbie in Unity but trying to learn as fast as my free time lets me. I'll try to be concise:

I have a unity 3D player that someone has made for me. I aim to load a scene that I make to this player, where I can mainly move the camera or rotate it. The way to load the scene is with asset bundles, but I'm having trouble to create them.

I have started from the most basic terrain, and, till now, I have been able to build (as asset bundle) a simple terrain with a grass texture and raisings. The next step has been to place trees, but I've spotted with the following error:

Building AssetBundle failed because hash collision was detected in the deterministic id generation. Conflict happened between Asset "Assets/Standard Assets/Environment/SpeedTree/Conifer/Conifer_Desktop Materials/LOD2/Branches_0.mat" and "Assets/Standard Assets/Environment/SpeedTree/Palm/Palm_Desktop Materials/LOD2/Branches_0.mat". UnityEditor.BuildPipeline:BuildAssetBundles(String, BuildAssetBundleOptions) CreateAssetBundles:BuildAllAssetBundles() (at Assets/Export.cs:12)

Trying to solve this problem I've googled for it and have found that it may be solved adding to the export.cs script the following parameter

BuildAssetBundleOptions.DeterministicAssetBundle

which I have added to no avail:

 using UnityEditor;
 using System.IO;
 
 public class CreateAssetBundles
 {
     [MenuItem ("Assets/Build Asset Bundles")]
     static void BuildAllAssetBundles ()
     {
         if (!Directory.Exists("AssetBundles") )
             Directory.CreateDirectory ("AssetBundles");
         
         BuildPipeline.BuildAssetBundles ("AssetBundles", BuildAssetBundleOptions.UncompressedAssetBundle | BuildAssetBundleOptions.DeterministicAssetBundle);
     }
 }

I've also tried loading just that parameter and not the Uncompressed one, but I've had the same result.

So the next thing I have tried has been to remove the files that are colliding. Let's say there are three LOD folders in which the files have the same names, I have removed two of those folders. The problem is that now I can't see the trees due to what I've done.

Do you know if there is any way to export assetbundle with these kind of trees or whatever objects I place in my terrain that have same names for different levels of detail? If not, is there anyway that I could rename those LODs withoud spending much time?

My next steps, if this scene would be exported successfully, was goint to be adding skybox, fog, wind, maybe moving animals or such. Will I have further problems exporting all those as assetbundle so my player will be able to work with that?

Thank's a lot in advance for your help!!

Kind regards.

Comment
Add comment · Show 3
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 xexijreil · Oct 28, 2015 at 03:35 PM 0
Share

I've found another obstacle while trying to build another AssetBundle.

I removed the trees and tried with a water table, but when I click on Build AssetBundle I get a $$anonymous$$icrosoft Visual C++ Runtime Library Error (I attach the screenshot). Do you have any idea about how to solve this??

View post on imgur.com

avatar image Bonfire-Boy xexijreil · Oct 28, 2015 at 04:24 PM 0
Share

I think you were on the right lines. The reason you can't see some of the trees after removing the duplicate(s) is that you've removed the material they were using. You probably just need to apply the other material (the one you haven't removed) to those trees in its place. I'm assu$$anonymous$$g that these materials are identical (hence the hash confusion).

avatar image xexijreil Bonfire-Boy · Oct 29, 2015 at 03:17 PM 0
Share

The problem is that I can't see any of the trees. The logic thing was that I would be able to see them just from a fixed distance or something like that but I can't at all, maybe I'm doing something wrong.

I've been suggested by Unity support to generate those trees dinamically on runtime, the problem is that that wouldn't work with the player I have, I just can pass the scene as AssetBundle, so hope sooner or later there will be a fix for this.

Thank's for your suggestion Bonfire!

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by xexijreil · Oct 28, 2015 at 12:50 PM

I've been looking for a solution and still trying other parameters of BuildPipeline but still no clue about how to solve it.

I've found this: http://issuetracker.unity3d.com/issues/assetbundle-collision-when-building-assetbundles

So I suppose this is a kind of unity bug and we'll going to have patience till it's solved. Anyway still hoping anyone have found a workaround for this and can help me.

Comment
Add comment · Show 1 · 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 str1d3r · Nov 03, 2015 at 01:25 AM 0
Share

I'm struggling to find a workaround for this issue too.

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

Error while downloading Asset Bundle: Failed to decompress data for the AssetBundle 0 Answers

Distribute terrain in zones 3 Answers

UNEXPECTED TOP-LEVEL EXCEPTION class name does not match path 1 Answer

please Help! - building for Android devices 0 Answers

How to fix: !CreateDirectoryRecursive(fullpath) 6 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