Legacy Documentation: Version 5.4
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

IUpdateSelectedHandler.OnUpdateSelected

public void OnUpdateSelected(EventSystems.BaseEventData eventData);

Parameters

eventData Current event data.

Description

Called by the EventSystem when the object associated with this EventTrigger is updated.

using UnityEngine;
using UnityEngine.EventSystems;

public class UpdateSelectedExample : MonoBehaviour, IUpdateSelectedHandler { public void OnUpdateSelected( BaseEventData data ) { Debug.Log( "OnUpdateSelected called." ); } }