Search Unity

Feature Request Exposing Secondary Textures at runtime

Discussion in '2D Experimental Preview' started by Lo-renzo, Sep 24, 2020.

  1. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    739
    From what I can tell, the ability to set Secondary Textures from script now only exists in Editor on the TextureImporter. Yet SecondarySpriteTexture looks like it exists in the engine itself, so I am wondering if it is possible to expose a setter so I may assign them at runtime.

    Context: I'm generating spritesheets out of vanilla and mod sprites on startup. Secondary Textures are super-nifty for avoiding material swaps or thinking about materials at all. It would simplify a lot.
     
    GliderGuy likes this.
  2. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    739
  3. mseithe

    mseithe

    Joined:
    Feb 17, 2017
    Posts:
    17
    +1
    Yeah, this would be really useful!
    I'm making a game where the textures are loaded in at runtime (since I want to allow modding later on). Exposing the secondary textures is the only way I could get normal map effects. Thanks!
     
unityunity