Moved UIRoutines call order. Call FinalizeChanges. Fixed UI Button Events. #359
|
@ -11,14 +11,14 @@ public class ChangeSceneButton : Script
|
|||
UIElement ui = GetComponent<UIElement>();
|
||||
if (ui != null)
|
||||
{
|
||||
ui.OnHoverEnter.RegisterAction(() =>
|
||||
ui.OnRelease.RegisterAction(() =>
|
||||
{
|
||||
Debug.Log("C# Hover Enter");
|
||||
|
||||
if (sceneID != 0)
|
||||
{
|
||||
//Audio.PlaySFXOnce2D("event:/UI/success");
|
||||
//SceneManager.ChangeScene(sceneID);
|
||||
//Audio.StopAllSounds();
|
||||
Audio.PlaySFXOnce2D("event:/UI/success");
|
||||
SceneManager.ChangeScene(sceneID);
|
||||
Audio.StopAllSounds();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -204,7 +204,7 @@ namespace SHADE
|
|||
SHButtonClickEvent clickEvent;
|
||||
clickEvent.EID = comp.GetEID();
|
||||
SHEventManager::BroadcastEvent(clickEvent, SH_BUTTON_HOVER_ENTER_EVENT);
|
||||
SHLOG_INFO("C++ BROADCASTED HOVER ENTER EVENT EID: {}", clickEvent.EID);
|
||||
//SHLOG_INFO("C++ BROADCASTED HOVER ENTER EVENT EID: {}", clickEvent.EID);
|
||||
}
|
||||
comp.isHovered = true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue