private void ProcessOnScreenDebugAttributeForMethod(MethodInfo info, Node node, bool add) { OnScreenDebug attr = DebugReflectionUtil.GetCustomAttribute <OnScreenDebug>(info) as OnScreenDebug; if (attr != null) { if (add) { // Add OnScreenDebugManager.AddOnScreenDebugInfo(ReplaceName(attr.DebugCategory, node), ReplaceName(attr.Name, node), () => GetValueOfMethod(info, node), attr.Color); } else { // Remove OnScreenDebugManager.RemoveOnScreenDebugInfo(ReplaceName(attr.DebugCategory, node), ReplaceName(attr.Name, node)); } } }