mirror of
https://github.com/RaindropViewer/RaindropViewer.git
synced 2026-07-27 22:11:39 +00:00
refactor: change OnApplicationQuit into OnDisable, as OnApplicationQuit is not called in unity test runner environment.
This commit is contained in:
committed by
alexiscatnip
parent
b49787d19f
commit
b1ce366504
@@ -25,7 +25,7 @@ public class connectivityUI : MonoBehaviour
|
||||
instance.Netcom.ClientLoggedOut += NetcomOnClientLoggedOut;
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
private void OnDisable()
|
||||
{
|
||||
instance.Netcom.ClientLoginStatus -= NetcomOnClientLoginStatus;
|
||||
instance.Netcom.ClientLoggedOut -= NetcomOnClientLoggedOut;
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Raindrop.Presenters
|
||||
usernameText.text = client.Self.Name;
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
private void OnDisable()
|
||||
{
|
||||
client.Network.SimConnected -= Network_SimConnected;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace Raindrop.UI.map.Map_SceneHierachy
|
||||
RegisterClientEvents();
|
||||
}
|
||||
|
||||
public void OnApplicationQuit()
|
||||
public void OnDisable()
|
||||
{
|
||||
UnregisterClientEvents(Client);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Raindrop.Presenters
|
||||
instance.Client.Objects.TerseObjectUpdate += ObjectsOnTerseObjectUpdate;
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
private void OnDisable()
|
||||
{
|
||||
instance.Client.Objects.AvatarUpdate -= Objects_AvatarUpdate;
|
||||
instance.Client.Objects.TerseObjectUpdate -= ObjectsOnTerseObjectUpdate;
|
||||
|
||||
Reference in New Issue
Block a user