crashkonijn / GOAP

A multi-threaded GOAP system for Unity
Apache License 2.0
1.16k stars 127 forks source link

Question: Can we reload domain and not have error in LateUpdate() in Goap? #287

Open mattemoore opened 1 week ago

mattemoore commented 1 week ago

Reloading domain causes null reference exception

NullReferenceException: Object reference not set to an instance of an object
CrashKonijn.Goap.Runtime.GoapBehaviour.Update () (at ./Library/PackageCache/com.crashkonijn.goap@8639d56f32/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapBehaviour.cs:35)

image

Package Version Beta v3

crashkonijn commented 6 days ago

Hi!

Can you please describe exactly what you're doing?

mattemoore commented 6 days ago

Sorry I could have been more explicit.

Basically I'm reloading the domain by running the scene in play mode, then changing some code in a Behaviour, saving file, then returning to unity editor which triggers a domain reload (i think?).