@small sleet When exit playmode, it will call at OnDisable() method at MonoBehaviour and if u use EntityManager api to do add/remove component then u will get error. I suspect it's caused by the entire Entities stuffs has been released and I just access the null. Any plan to make Entities stuffs release later than MonoBehaviour callback?
#[Entities 1.0.0-pre.15] Error when calling EntityManager api at MonoBehaviour when exit playmode
1 messages · Page 1 of 1 (latest)
NullReferenceException: Object reference not set to an instance of an object
Unity.Entities.EntityQueryImpl.GetSingletonEntity () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.15/Unity.Entities/Iterators/EntityQuery.cs:1274)
Unity.Entities.EntityQuery.GetSingletonEntity () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.15/Unity.Entities/Iterators/EntityQuery.cs:2583)
xxx.OnDisable () (at Assets/xxxcs:63)
no such plans i'm aware of. it makes sense that that would happen. what overall problem would it solve to change it?
😂 Actually i's just annoying that I see there's a lot of error spamming every time I exit playmode