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; iLightMaps. 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!