fix(Edgegap Plugin): fix NRE when reloading assets

This commit is contained in:
mischa 2023-12-11 12:06:28 +01:00
parent a27a0aedc3
commit c1be7b30e3

View File

@ -164,6 +164,10 @@ public async void CreateGUI()
protected void OnDisable()
{
#if UNITY_2021_3_OR_NEWER // MIRROR CHANGE: only load stylesheet in supported Unity versions, otherwise it shows errors in U2020
// MIRROR CHANGE: sometimes this is called without having been registered, throwing NRE
if (_debugBtn == null) return;
// END MIRROR CHANGE
unregisterClickEvents();
unregisterFieldCallbacks();
SyncObjectWithForm();