-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Thank you for providing this useful program!
My error:
NullReferenceException: Object reference not set to an instance of an object
TuioUnity.Utils.TuioDebug.OnDestroy () (at Library/PackageCache/com.interactive-scape.tuio_client@fc3d05d54a/Runtime/Utils/TuioDebug.cs:31)
TuioDebug.cs
private void OnDestroy()
{
_tuioBehaviour.OnUpdate -= UpdateText;
Destroy(_debugText.gameObject);
}
Null check silences this error:
private void OnDestroy()
{
if (_tuioBehaviour != null)
{
_tuioBehaviour.OnUpdate -= UpdateText;
}
if (_debugText != null && _debugText.gameObject != null)
{
Destroy(_debugText.gameObject);
}
}
I apologies for the lack of explanation. English is not my native language.
I hope this is helpful for improving the package.
Thank you for your time and consideration.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels