public static void Initiate() { if (isInitialized) { return; } isInitialized = true; InvocationFlow <MonoBehaviour> .IsValid = (MonoBehaviour script) => script != null; // check valid with Unity's overloaded Null Operator InvocationFlow <MonoBehaviour> .IsEnabled = (MonoBehaviour script) => script.isActiveAndEnabled; // check if behaviour is running update InvocationFlow <MonoBehaviour> .LinkDeltaTimeProperties(typeof(Time).GetProperty(nameof(Time.deltaTime)), typeof(Time).GetProperty(nameof(Time.unscaledDeltaTime))); singleton = new GameObject("InvocationFlowController", typeof(InvocationFlowController)); }
static InvocationFlowController() { InvocationFlow <Behaviour> .IsValid = (Behaviour x) => x.Valid; InvocationFlow <Behaviour> .LinkDeltaTimeProperties(typeof(InvocationFlowController).GetProperty(nameof(deltaTime)), typeof(InvocationFlowController).GetProperty(nameof(unscaledDeltaTime))); }