I am generating preview textures and need ro save them in my bundle.
My first problem was that they had no associated asset, so now Im creating assets like this:
foreach(TileRecord rec in editee.tileList){
AssetDatabase.CreateAsset(rec.PreviewImage,
"Assets/Scenes/TilesetEditor/Assets/images/"+rec.name+"_preview.asset");
}
However now when I go to save the bundle all the preview assets throw this error:
An asset is marked as dont save, but is included in the build:
Asset: 'Assets/Scenes/TilesetEditor/Assets/images/room-floor_preview.asset'
Included from scene: 'Assets/Scenes/Main Menu/Main Menu.unity'
UnityEditor.BuildPipeline:BuildAssetBundle(Object, Object[], String, BuildAssetBundleOptions)
TilesetInspector:ExportTileset(Tileset) (at Assets/Scenes/TilesetEditor/editor/TilesetInspector.cs:189)
TilesetInspector:ExportAssetAsBundle(MenuCommand) (at Assets/Scenes/TilesetEditor/editor/TilesetInspector.cs:175)
It seems like i need to set them savable somehow but I can’t figure out how.