How To Show Cursor While Still Being Able to Click On UI?

SteveC

Member
Hey y'all!

How do I get the cursor visible and disable character input, while still being able to click on GUI elements?

[UPDATE]
Sometimes you're your own worst enemy, que no?

Resolved it by:
1. On the player, set UnityInput.DisableCursor & UnityInput.EnableCursorWithEscape =FALSE
That solved the cursor issue, just need to disable player input

2. Added the EventSystem & StandaloneInputModule my UI needs to function =)
1032
[/UPDATE]


I have the following Inventory UI slot defined in my scene:

1029

I've added the OnMouseHover script for debugging OnPointerEnter and OnPointerExit to see if I can get any input registered:

Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;

public class OnMouseHover : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler {

    public void OnPointerEnter(PointerEventData eventData)
    {
        Debug.Log ("Mouse has entered");
    }

    public void OnPointerExit(PointerEventData eventData)
    {
        Debug.Log ("Mouse has exited");
    }
}

Unfortunately, no such luck getting any UI action. In a separate scene, UI works perfect, not sure how to integrate the two together.

Thanks much!
 
Last edited:
Top