Cannot build asset bundle of a terrain with trees placed


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
Materials/LOD2/Branches_0.mat” and
(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


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.

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: Unity Issue Tracker - [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.