AssetDatabase.CreateAsset() for textures

Hi there,

I am using the AssetDatabase.CreateAsset() to create texture assets inside the editor. So what I am doing is I have a bunch of textures, apply a trimming algorithm to them, and then save the result in separate texture assets. It works really well and the textures are created, but when I click on the texture asset, I can not see all the properties that you usually get for textures (texture type, grayscale, mipmapping, filter etc). I only get wrap mode, filter and aniso level properties.

Is there a way to have the generated texture asset show the same properties as the other textures?

Thanks,
Andrew

So here’s a screenshot of what I am expecting:
3228534--247714--ExpectedInspector.png

But this is what I get:
3228534--247716--WhatIGet.png

Ok. Figured it out. The textures needs to first be saved as an image file with a valid image extension :slight_smile:

1 Like

If you save the image, why would you want to create an asset from the image ? You will have twice the file if you do that, don’t you ?

well it’s clear he won’t use CreateAsset anymore but instead will ImportAsset the file :smile: (as he didn’t mention it in the second post)