Search Unity

Sprite vs Texture for covering 3D voxel faces

Discussion in 'General Graphics' started by Danixadem, Jun 19, 2021.

  1. Danixadem

    Danixadem

    Joined:
    Jul 31, 2018
    Posts:
    16
    Untill now I used sprites that were sliced via sprite editor for texturing 3D voxel faces. It worked fine for my purpose and provided great ease of use since (once sliced by the editor) they can be dragged and dropped into the fields exposed on the inspector. Therefore I could easily grab its width-height and UV coordinates by unity's library. However, as far as I know, sprites are mainly for 2D projects and they can be directly added into the scene as game objects. I wonder if there is any performance or memory penalty caused by them. If so is it worth for me to redo all the stuff and turn back to using texture format? Because setting texture UV coordinates through code will be a lot harder instead of just drag and drop.
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,343
    No, it isn't worth it. There's nothing really wrong with using sprites, they're not really any different than a normal texture apart from having some default import settings (which you can override) and supporting manual and auto atlasing. If they work for your use case, there's no reason not to use them.
     
    Danixadem likes this.
  3. Danixadem

    Danixadem

    Joined:
    Jul 31, 2018
    Posts:
    16
    Thanks a lot for your reply mate !