You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.
When I set Domain Reload to disable in PlayerSettings > Editor > Enter PlayMode Options,
the following code throws NullReferenceExteption.
After setting Domain Reload to disable, enter PlayMode twice.
NullReferenceException: Object reference not set to an instance of an object
UniRx.MainThreadDispatcher.LateUpdateAsObservable () (at Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs:643)
UniRx.Observable.EveryLateUpdate () (at Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs:717)
Test.Start () (at Assets/Test.cs:8)
using UniRx;using UnityEngine;publicclassTest:MonoBehaviour{publicvoidStart(){
Observable.EveryLateUpdate().Subscribe(x => Debug.Log("a"));}}
Environment
Unity2020.3.4f1
The text was updated successfully, but these errors were encountered:
Right now, what happens is, UniRX is still trying to call LateUpdate on your object. But it doesn't exist anymore.
This also happens during runtime if you decide to remove the object in the inspector.
You could make it work by adding AddTo(this), so it unsubscribes when the GameObject has been destroyed:
When I set Domain Reload to disable in PlayerSettings > Editor > Enter PlayMode Options,
the following code throws NullReferenceExteption.
After setting Domain Reload to disable, enter PlayMode twice.
Environment
The text was updated successfully, but these errors were encountered: