Cursor TGA

how can i change my cursor by selecting a sliced image from Sprite Editor
I used .TGA img

I tried in Edit->Project Settings.> Cursor but i can only choose a image. pls

182560-screenshot-6.png

You can implement your cursor. Assign this script to the cursor object and you can change its sprite from any script.

using UnityEngine;

[RequireComponent(typeof(SpriteRenderer))]
public class CursorMovement : MonoBehaviour
{
    // Assign orthographic camera in the inspector.
    public Camera         orthographicCamera ;
    static SpriteRenderer mySpriteRenderer   ;

    private void Start()
    {
        Cursor.visible = false;
        mySpriteRenderer = GetComponent<SpriteRenderer>();
    }

    void Update()
    {
        // The camera must be orthographic for this method to work.
        var worldPosition = orthographicCamera.ScreenToWorldPoint(Input.mousePosition);
        transform.position = worldPosition + orthographicCamera.transform.forward;
    }

    // Use this function to assign a sprite to the cursor.
    public static void ChangeSpriteOfCursor(Sprite sprite)
    {
        mySpriteRenderer.sprite = sprite;
    }
}

Thanks man… i’m doing a MMO game and i need to change my cursor when i rotate my camera since I do it with the right click.
This method not good for me