Closed Setmaster closed 3 years ago
Are you sure you're using DOTween.Kill on the correct transform (the one you use in trasnform.DOPath
)? I would also recommend to simply store the tween generated by transform.DOPath
and kill that directly inside the gameObject's OnDestroy (though that's not the problem here because the static kill with the right target already should work, unless the tween is regenerated after for some reason).
Putting the path.kill inside gameObject OnDestroy worked
@Setmaster How Did you do that? please Explain. Dotween.Kill(transform) inside of OnDestroy ofObject?
@Setmaster How Did you do that? please Explain. Dotween.Kill(transform) inside of OnDestroy ofObject?
He put path.kill() on gameObject reference that has the DOPath in the method OnDestroy() (MonoBehaviour)
I'm getting this error:
Target or field is missing/null () ► The object of type 'Transform' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object.
when I destroy a gameobject that created a path and executes it with this script:I tried using DOTween.Kill on it's transform before destroying it but that didn't stop the error from happening.