I would like to create texture assets from a python script. I can’t find any examples of how to do this. I see examples of how to use AssetTools.create_asset for other types of assets but that doesn’t seem to work for textures.
You can use Python to create a default Texture2DFactoryNew instance, feed that into the AssetTools to create the asset, then use a render target to write to the new asset while overriding all the asset’s properties, such as format, compression, etc… Sadly, there’s very little you can do to/with the factory instance, so you can’t really initialize your Texture2D asset to the expected values, but the render to texture call can do that for you.