示例#1
0
            private void UpdateNodeName(Node node)
            {
                var newName = EditorGUILayout.TextField("Node Name", node.name);

                var overlapping = Node.allNodeNames.GroupBy(x => x)
                    .Where(group => group.Count() > 1)
                    .Select(group => group.Key);
                if (overlapping.Any() && overlapping.Contains(newName)) {
                    EditorGUILayout.HelpBox("node name is overlapping:" + newName, MessageType.Error);
                }

                if (newName != node.name) {
                    node.BeforeSave();
                    node.name = newName;
                    node.UpdateNodeRect();
                    node.Save();
                }
            }
示例#2
0
            private void UpdateDeleteSetting(Node currentNode)
            {
                var currentNodePlatformPackageKey = GraphStackController.Platform_Package_Key(currentNode.currentPlatform);

                if (currentNodePlatformPackageKey == AssetBundleGraphSettings.PLATFORM_DEFAULT_NAME) return;

                using (new EditorGUILayout.HorizontalScope()) {
                    GUILayout.FlexibleSpace();
                    if (GUILayout.Button("Use Default Setting", GUILayout.Width(150))) {
                        currentNode.BeforeSave();
                        currentNode.DeleteCurrentPackagePlatformKey(currentNodePlatformPackageKey);
                        GUI.FocusControl(string.Empty);
                        currentNode.Save();
                    }
                }
            }