public AddNodeMenuData Add(string name, AddNodeMenuData data) { if (!IsNodeEntry && !m_Data.ContainsKey(name)) { m_Data.Add(name, data); return(data); } return(null); }
private void BuildRootData() { m_RootData = new AddNodeMenuData(); foreach (var nodeInfo in Node.NodeInfos) { var attrs = nodeInfo.type.GetCustomAttributes(typeof(MarkAsNode), false); var displayName = nodeInfo.type.GetDisplayName(); if (attrs.Length != 0) { var attr = attrs[0] as MarkAsNode; if (attr.HideInInspector) { continue; } if (attr.DisplayName != null) { displayName = attr.DisplayName; } } AddNodeInfoToRoot(nodeInfo, displayName); } }