fix(tutorial): complete click targets from UI events
Publish UPM package / publish (push) Successful in 2s
Publish UPM package / publish (push) Successful in 2s
This commit is contained in:
4 files changed
+76
-2
No files matched your search
@@ -1,12 +1,20 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace ShrinkTutorial
|
||||
{
|
||||
public class ShrinkTutorialAnchor : MonoBehaviour
|
||||
public class ShrinkTutorialAnchor : MonoBehaviour, IPointerClickHandler
|
||||
{
|
||||
[SerializeField] private string anchorId = string.Empty;
|
||||
|
||||
public string AnchorId => anchorId;
|
||||
public event Action<PointerEventData> Clicked;
|
||||
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
Clicked?.Invoke(eventData);
|
||||
}
|
||||
|
||||
public void SetAnchorId(string value)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user