mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2026-10-11 09:58:02 +08:00
Prevent null reference if Canvas isn't created yet
This commit is contained in:
1 parent
d0e508727a
commit
084aee617c
1 file changed
+10
@@ -160,6 +160,16 @@ namespace UnityExplorer.Core.Input
|
||||
|
||||
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)
|
||||
{
|
||||
lastEventSystem = value;
|
||||
|
||||
Reference in new issue
Block a user