Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Tatanan on November 10, 2014, 05:42:33 AM
-
Usually, for having a custom cursor pointer in Web Player, Unity offers you the class Cursor as follows:
private Texture2D cursorTexture;
cursorTexture = MyResources.Load<Texture2D>("handCursor");
Cursor.SetCursor(cursorTexture, cursorPosition, CursorMode.Auto);
I need to have a texture in a Resources folder.
I'd like to create that Texture2D from a NGUI Atlas. Is it possible? May I create a Texture2D from an Atlas?
I know NGUI has something to handle cursor, but as far as I know, it's not really a cursos but a sprite following the pointer, which it's not exactly what I need (unless I'm wrong).
Thank you.
-
NGUI atlas is a collection of textures. It's not a good idea to place your cursor in an atlas as Unity won't take advantage of it. Keep it a separate texture.