private static int GetUpdateOrder(UnityAction callback) { object[] customAttributes = callback.Method.GetCustomAttributes(typeof(BeforeRenderOrderAttribute), true); BeforeRenderOrderAttribute beforeRenderOrderAttribute = (customAttributes != null && customAttributes.Length != 0) ? (customAttributes[0] as BeforeRenderOrderAttribute) : null; return((beforeRenderOrderAttribute != null) ? beforeRenderOrderAttribute.order : 0); }
private static int GetUpdateOrder(UnityAction callback) { object[] customAttributes = callback.Method.GetCustomAttributes(typeof(BeforeRenderOrderAttribute), true); BeforeRenderOrderAttribute beforeRenderOrderAttribute = (customAttributes == null || customAttributes.Length <= 0) ? null : (customAttributes[0] as BeforeRenderOrderAttribute); return((beforeRenderOrderAttribute == null) ? 0 : beforeRenderOrderAttribute.order); }
static int GetUpdateOrder(UnityAction callback) { object[] attributes = callback.Method.GetCustomAttributes(typeof(BeforeRenderOrderAttribute), true); BeforeRenderOrderAttribute updateOrder = (attributes != null && attributes.Length > 0) ? attributes[0] as BeforeRenderOrderAttribute : null; return(updateOrder != null ? updateOrder.order : 0); }