Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

ScriptedImporter Texture Style Importer?

Discussion in 'Scripting' started by CyRaid, Jul 17, 2019.

  1. CyRaid

    CyRaid

    Joined:
    Mar 31, 2015
    Posts:
    80
    Hi there!

    Does anyone know of a way to generate an asset with ScriptedImporter to show as if it were a PNG for example? If I make it show as a Texture2D it shows the few texture options (like filter, wrap), if I make the main asset as a Sprite then it shows pivot and border.. But none seem to show the default importer for images (the one you see where you can edit pixels per unit, whether it's a 2D sprite or texture, etc.)

    I did see in the documentation there is something called TextureGenerator, but that doesn't do me any good as it isn't really an asset (object), just a struct that generates some sprites and textures.

    I know it could be possible to dig into the internal classes and possibly show the InspectorGUI() or something, but something not internal would be nice. :)

    Edit: I'm currently aware of TextureImporter but it's a sealed class..
     
    Last edited: Jul 17, 2019