/InstacelessUnityEvents

An instanceless delegate binder which lets you assign function in editor without requiring instance at the time and providing ability to late initialize the event with target invoker.

Primary LanguageC#MIT LicenseMIT

Instance-lessUnityEvents

An instanceless delegate binder which lets you assign function in editor without requiring instance at the time and providing ability to late initialize the event with target invoker.

Pros:

  • Insanely Fast compared UnityEvents, Serializable Callback with near performance to native delegates.
  • Allows binding instance latey and lets you assign function at edit time without requiring instance.
  • Typesafe by default.
  • Ideal for mobile devices and handheld where battery life is concerned.

Cons:

  • Binding class need to be resolved at compiletime, This may not be a severe issue but might casue some level of tweaking where assemblies are present.
  • The assignment of the functions are limited to the class assigned, child class support will be added later, but it is by design to ensure performance and to provide strong reference info during developement.

Benchmarks: Backend: (IL2CPP) Compiler Optimisation Configuration: Master

Bar Graph

Bar Graph

Method Selection Without Requiring Instance, but restricted to target Type declared in delegate:

Bar Graph

Dynamic Argumemnt Draw similar to unity events:

Bar Graph

Set Target Invoker at any point in execution with typesafety and minimal performance hit:

Bar Graph

Uses Drawer code from Siccity.SerialiableCallback