Search Unity

Realtime mesh for Sprite

Discussion in '2D' started by tiagosr, Nov 25, 2013.

  1. tiagosr

    tiagosr

    Joined:
    Sep 16, 2013
    Posts:
    6
    Hi,

    Here's something I couldn't find anywhere (either in the docs or through reflection in scripting): is there any way to manipulate a sprite's mesh (transform points, generate more triangles for sub-sprite deformations, etc) through code? I'm using Pro 4.3.0f4 (OSX), couldn't find it anywhere...

    I'm guessing right now that this is something I won't find, at least in the published interfaces, in this version, so failing this, is there any way to put a 3D mesh to render at a certain sprite sorting layer? From what I've seen, it looks like the complete sum of sprite layers are contained in a single render layer.

    Thanks in advance!
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    There's no access to sprite meshes. You can use renderer.sortingLayerID on standard meshes.

    --Eric
     
  3. tiagosr

    tiagosr

    Joined:
    Sep 16, 2013
    Posts:
    6
    Thanks for the heads-up Eric5h5!

    renderer.sortingLayerID solved my problems pretty well, thanks again - but I think it's a pity we don't have access to the sprite meshes on runtime, still.