Cannot save a generated texture as part of a bundle

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){

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.

Figured it out. I had to set the hideFlags on the created Texture2D.

On to the next issue,…