Custom Cursor (Sprite) goes behind GUI elements

Hi everyone ! Im a newbie here.

Thing is, I created an animated cursor (sprite with animator attached), everything works just fine but my cursor keep going behind GUI buttons (as GUI elements are drawn last) !?!!?

I’ve already tried using GUI.depth without luck, setting up another camera and culling mask didn’t help neither !!!

Did much research but found nothing, Im stuck here now ! Please help me :frowning: !!!

Sorry about my English and thanks in advance !!!

You can make the custom cursor using GUI.DrawTexture instead of sprites, or use a hardware cursor.

–Eric

Tks Eric but the fact is i want my cursor to be “animated”, can you please show me how to draw a sprite sheet with
GUI.DrawTexture ? I did search for it but there seems to be no detail infos.

Tks again :smile: !!!

You can use an array of textures.

–Eric

Working on it by now ! Tks again ! I really appreciate that :smile: !!!

Tks for all those replies Eric !!! I know u’r busy with ur work but would u plz help me one more time ??

U said i should use an array of texture yes ?

But now my texture is from a sprite sheet and i cant use a sprite frame as texture (Unity wont let me).

Is there any “easy” way to achieve that instead of writing a script to convert them ?

And after all these GUI will be hidden by ModalWindow but i’ll figure a way to fix that later :smile: !