How to check null?
How to check if the function is not set up?
I also wish to know that. If I try to get a result of a callback that has no listeners yet, I get
IndexOutOfRangeException: Index was outside the bounds of the array.
InvokableCallback2[T0,TReturn].Invoke (System.Object[] args) (at ./Library/PackageCache/com.github.siccity.serializablecallback@7ff19f1223/Runtime/InvokableCallback.cs:38) SerializableCallback2[T0,TReturn].Invoke (T0 arg0) (at ./Library/PackageCache/com.github.siccity.serializablecallback@7ff19f1223/Runtime/SerializableCallback.cs:37)
And I can't see a way to check it. Did you find a solution @alijaya ?
[Edit:] Anyways, it should always be fixable by putting a try block around it, even if it's not a nice workaround.