// Bind Axes internal void BindAxes(AxesAlwaysHandler m_Handler) { useAlways = true; if (alwaysHandler != m_Handler) { alwaysHandler += m_Handler; } }
// UnBind Axes internal void UnBindAxes(AxesAlwaysHandler m_Handler) { if (alwaysHandler == m_Handler) { alwaysHandler -= m_Handler; useAlways = (clickHandler != null); } }
/// <summary> /// Unbind your void of controller update, identified by controllerName. /// </summary> /// <param name="controllerName"></param> /// <param name="m_Handler"></param> public static void UnBindAxes(string controllerName, AxesAlwaysHandler m_Handler) { foreach (AxesBasedController controller in abControllers) { if (controller.MyName == controllerName) { controller.UnBindAxes(m_Handler); return; } } Debug.LogError("Controller: " + controllerName + " not found!"); }