Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

ScriptedImporter Texture Style Importer?

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

  1. CyRaid

    CyRaid

    Joined:
    Mar 31, 2015
    Posts:
    134
    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