Home > other >  Untiy packaging LightMap error: the Inconsistent asset when sorting preload assets: & # x27; & # x27
Untiy packaging LightMap error: the Inconsistent asset when sorting preload assets: & # x27; & # x27

Time:09-19

(64 - bit version: Unity 2017.2 f1)

Code:
 
LightMaps LightMaps=ScriptableObject. CreateInstance (a);
Int count=LightmapSettings. Lightmaps. Length;
LightMaps. LightmapColor=new Texture2D (count);
LightMaps. LightmapDir=new Texture2D (count);
LightMaps. ShadowMask=new Texture2D (count);

for (int i=0; i LightMaps. LightmapColor [I]=LightmapSettings. LightMaps [I] lightmapColor;
LightMaps. LightmapDir [I]=LightmapSettings. LightMaps [I] lightmapDir;
LightMaps. ShadowMask [I]=LightmapSettings. LightMaps [I]. ShadowMask;
}

AssetDatabase. CreateAsset (lightMaps. "Assets/RealV/LightmapTexture/lightMaps. Asset");
SetAssetBundlesName (path);
BuildPipeline. BuildAssetBundles (targetSourceDir, BuildAssetBundleOptions. None, BuildTarget StandaloneWindows);


Error:
The Inconsistent asset when sorting preload assets: 'count: 0
UnityEditor. BuildPipeline: BuildAssetBundles (String, BuildAssetBundleOptions, BuildTarget)
Com. RDTech. Tools. Unity. Editor. CreateObjectTree: rdBuild () (at Assets/Scripts/Editor/CreateObjectTree cs: 43)

For help!
  • Related