mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-01 19:13:03 +08:00
Prevent null reference if Canvas isn't created yet
This commit is contained in:
@ -160,6 +160,16 @@ namespace UnityExplorer.Core.Input
|
|||||||
|
|
||||||
public static void Prefix_EventSystem_set_current(ref EventSystem value)
|
public static void Prefix_EventSystem_set_current(ref EventSystem value)
|
||||||
{
|
{
|
||||||
|
if (!UIManager.EventSys)
|
||||||
|
{
|
||||||
|
if (value)
|
||||||
|
{
|
||||||
|
lastEventSystem = value;
|
||||||
|
lastInputModule = value.currentInputModule;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!settingEventSystem && value != UIManager.EventSys)
|
if (!settingEventSystem && value != UIManager.EventSys)
|
||||||
{
|
{
|
||||||
lastEventSystem = value;
|
lastEventSystem = value;
|
||||||
|
Reference in New Issue
Block a user