Siccity / SerializableCallback

UnityEvent and System.Func had a child
MIT License
359 stars 53 forks source link

Function signature is confused #11

Open OneFirefly opened 4 years ago

OneFirefly commented 4 years ago

Deriving a class like public class ColliderCallback : SerializableCallback<Collider, bool> {} and exposing it the proper way: public ColliderCallback colliderCallback; will make it fail to show a function like bool CallThis<Collider>() { .. } in the list of available functions in the inspector.

Instead it will show a function bool CallThat<bool>() { .. } (if declared).

The included package should be loaded in a new Unity project SerializableCallback_bug_reproduction.zip

Siccity commented 4 years ago

I'm not sure that SC supports generic methods at all. It's designed to show only bool Method(Collider collider) as dynamic, and bool Method() as static. Ill check for options but I can't make any promises.