Example #1
0
 ///<summary>
 /// Change the cursor regarding given cursorType
 ///</summary>
 ///<param name="_e">Given event data</param>
 private void OnChangeCursor(ChangeCursorEvent _e)
 {
     foreach (CursorData cursorData in cursors)
     {
         if (cursorData.cursorType == _e.type)
         {
             Cursor.SetCursor(cursorData.texture, cursorData.offset, CursorMode.Auto);
         }
     }
 }
Example #2
0
 private void ChangeCursor(object sender, ChangeCursorEvent e)
 {
     if (string.IsNullOrEmpty(e.cursorKey))
     {
         Cursor.SetCursor(DefaultCursor, Vector2.zero, CursorMode.Auto);
         return;
     }
     PrefabManager.Instance.LoadAssetAsync <Texture>(e.cursorKey, (result) =>
     {
         Cursor.SetCursor(result.result as Texture2D, Vector2.zero, CursorMode.Auto);
     });
 }