Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Cursor Set Image#

Input / Cursor / Cursor Set Image

Description#

Executes the Set Image static method of the Cursor class

Parameters#

Name Description
Texture
Hotspot
Cursor Mode

Code#

// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("Cursor Set Image")]
    [Category("Input/Cursor/Set Image")]
    [Description("Executes the Set Image static method of the Cursor class")]

    [Image(typeof(IconCursor), ColorTheme.Type.Blue)]
    [Keywords("Mouse, Pointer")]

    [Parameter("Texture")]
    [Parameter("Hotspot")]
    [Parameter("Cursor Mode")]

    [Serializable]
    public class GenInstructionCursor_SetCursor_3 : Instruction
    {
        [SerializeField] private GetTexture m_Texture = new GetTexture();

        [SerializeField] private GetVector2 m_Hotspot = new GetVector2();

        [SerializeField] private CursorMode m_CursorMode = default;

        protected override string GetTitle(GameObject source)
        {
            string className = TextUtils.ThemeAsKeyword("Cursor");
            string method = TextUtils.ThemeAsKeyword("Set Cursor");
            return $"{className} {method} ({this.m_Texture}, {this.m_Hotspot}, {this.m_CursorMode})";
        }

        protected override Awaitable Run(Args args)
        {
            Cursor.SetCursor(
                (Texture2D) this.m_Texture.Get(args),
                (Vector2) this.m_Hotspot.Get(args),
                this.m_CursorMode
            );

            return Done;
        }
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.