From 2a16deb8ff155cacabc58f402ae03140e06a10a2 Mon Sep 17 00:00:00 2001 From: S2NX7 Date: Wed, 29 Jul 2026 02:01:24 +0200 Subject: [PATCH] Improved UI, Code Generation and Shared Data bugs Improve the UI to be more simplistic and closer to Bolt 2, Improved some generators and some generated variable names. Fixed bugs on some units that would store values directly on the node so their values/states would be shared across non embed subgraphs. Also replaced internal use of InstanceIDs for better compatibility to with 6.4+ --- .../CSharpPreviewWindow.cs | 37 + .../Nodes/AssetFieldUnitDescriptor.cs | 20 +- Editor/Code/Editors/ClassAssetEditor.cs | 8 +- Editor/Code/Editors/DelegateAssetEditor.cs | 5 + Editor/Code/Editors/InterfaceAssetEditor.cs | 9 +- Editor/Code/Editors/MemberTypeAssetEditor.cs | 11 +- Editor/Code/Generators/BaseGraphGenerator.cs | 13 +- Editor/Code/Generators/GameObjectGenerator.cs | 1 - .../Nodes/Collections/AddListItemGenerator.cs | 4 - .../Nodes/Control/CooldownGenerator.cs | 14 +- .../Nodes/Control/ForEachGenerator.cs | 75 +- .../Nodes/Control/SwitchOnIntegerGenerator.cs | 20 +- .../Control/TriggerReturnEventGenerator.cs | 1 - .../Nodes/Control/TryCatchGenerator.cs | 2 +- .../Control/WaitForManualPressGenerator.cs | 2 +- .../CustomEvent/ChannelEventGenerator.cs | 5 +- .../DefinedEvent/DefinedEventNodeGenerator.cs | 4 - .../GlobalDefinedEventNodeGenerator.cs | 1 - .../Listeners/OnEveryXSecondsGenerator.cs | 1 - .../Events/Listeners/OnRetrievedGenerator.cs | 7 +- .../Events/Listeners/OnReturnedGenerator.cs | 7 +- .../Nodes/Events/ReturnEventGenerator.cs | 15 +- .../UnityEvents/OnKeysPressedGenerator.cs | 1 - .../Methods/AssetMethodCallUnitGenerator.cs | 2 +- .../Base/Methods/BaseMethodCallGenerator.cs | 2 +- .../Methods/InheritedMethodCallGenerator.cs | 2 +- .../Generators/Nodes/Logic/AndGenerator.cs | 27 +- .../Nodes/Logic/BinaryOperatorGenerator.cs | 157 ++ .../Logic/BinaryOperatorGenerator.cs.meta | 2 + .../Generators/Nodes/Logic/EqualGenerator.cs | 65 +- .../Nodes/Logic/ExclusiveOrGenerator.cs | 23 +- .../Nodes/Logic/GreaterGenerator.cs | 27 +- .../Nodes/Logic/GreaterOrEqualGenerator.cs | 27 +- .../Generators/Nodes/Logic/LessGenerator.cs | 27 +- .../Nodes/Logic/LessOrEqualGenerator.cs | 29 +- .../Nodes/Logic/LiteralGenerator.cs | 2 +- .../Nodes/Logic/LogicalOperatorGenerator.cs | 56 + .../Logic/LogicalOperatorGenerator.cs.meta | 2 + .../Nodes/Logic/NotEqualGenerator.cs | 74 +- .../Generators/Nodes/Logic/OrGenerator.cs | 22 +- .../Nodes/Math/Round/BaseRoundGenerator.cs | 2 +- .../Nodes/Members/GetMemberGenerator.cs | 18 +- .../Nodes/Members/InvokeMemberGenerator.cs | 16 +- .../Nodes/Members/SetMemberGenerator.cs | 3 +- .../Code/Generators/Nodes/NodeGeneration.cs | 39 +- .../Nodes/Variables/GetVariableGenerator.cs | 11 +- .../Variables/IsVariableDefinedGenerator.cs | 8 +- Editor/Code/Options/CodeOptions.cs | 7 +- Editor/Code/Resources/as_32.png.meta | 62 +- Editor/Code/Resources/binary_save_32.png.meta | 62 +- Editor/Code/Resources/class_16.png.meta | 62 +- Editor/Code/Resources/class_32.png.meta | 62 +- .../Code/Resources/class_variable_32.png.meta | 62 +- Editor/Code/Resources/code_32.png.meta | 62 +- Editor/Code/Resources/compilation_16.png.meta | 62 +- Editor/Code/Resources/constructor_32.png.meta | 62 +- Editor/Code/Resources/continue_32.png.meta | 62 +- Editor/Code/Resources/contract_32.png.meta | 62 +- Editor/Code/Resources/enum_16.png.meta | 62 +- Editor/Code/Resources/enum_32.png.meta | 62 +- Editor/Code/Resources/event_16.png.meta | 62 +- Editor/Code/Resources/explorer_16.png.meta | 62 +- Editor/Code/Resources/flow_16.png.meta | 62 +- Editor/Code/Resources/flow_32.png.meta | 62 +- .../Code/Resources/flow_reroute_32.png.meta | 62 +- Editor/Code/Resources/getter_32.png.meta | 62 +- Editor/Code/Resources/interface_16.png.meta | 62 +- Editor/Code/Resources/interface_32.png.meta | 62 +- Editor/Code/Resources/invoke_32.png.meta | 62 +- Editor/Code/Resources/is_unit@32x.png.meta | 62 +- Editor/Code/Resources/label_unit@32x.png.meta | 62 +- Editor/Code/Resources/lock_32.png.meta | 62 +- Editor/Code/Resources/method_16.png.meta | 50 +- Editor/Code/Resources/multi_array_32.png.meta | 62 +- Editor/Code/Resources/object_32.png.meta | 50 +- Editor/Code/Resources/okay_32.png.meta | 62 +- Editor/Code/Resources/override_16.png.meta | 62 +- Editor/Code/Resources/override_32.png.meta | 62 +- Editor/Code/Resources/parameters_16.png.meta | 62 +- .../Resources/processor_directiv_32.png.meta | 62 +- Editor/Code/Resources/property_16.png.meta | 62 +- Editor/Code/Resources/property_32.png.meta | 62 +- Editor/Code/Resources/return_32.png.meta | 62 +- .../Code/Resources/return_event_32.png.meta | 62 +- Editor/Code/Resources/scope_32.png.meta | 62 +- Editor/Code/Resources/search_16.png.meta | 62 +- Editor/Code/Resources/setter_32.png.meta | 62 +- Editor/Code/Resources/settings_16.png.meta | 62 +- Editor/Code/Resources/special_16.png.meta | 62 +- Editor/Code/Resources/special_32.png.meta | 62 +- Editor/Code/Resources/struct_16.png.meta | 62 +- Editor/Code/Resources/struct_32.png.meta | 62 +- Editor/Code/Resources/this_32.png.meta | 62 +- .../Code/Resources/value_reroute_32.png.meta | 62 +- Editor/Code/Resources/variables_16.png.meta | 62 +- Editor/Code/Resources/variables_32.png.meta | 62 +- Editor/Code/Resources/void_32.png.meta | 62 +- Editor/Code/Resources/warning_32.png.meta | 62 +- .../Delegates/BindDelegateNodeWidget.cs | 6 + .../Delegates/DelegateInvokeNodeWidget.cs | 6 + .../Widgets/Delegates/DelegateNodeWidget.cs | 6 + .../Delegates/UnbindDelegateNodeWidget.cs | 6 + Editor/Internal/AOTMethodsPrebuilder.cs | 10 +- .../GraphGUI/GraphGUIFloatingToolbar.cs | 444 ++- .../Patches/GraphGUI/GraphGUIPatch.cs | 4 +- .../Patches/GraphGUI/GraphGUIStyles.cs | 20 +- .../Patches/GraphGUI/GraphGUIToolbar.cs | 89 +- .../Patches/GraphGUI/GraphGUIUtilities.cs | 37 +- .../GraphMinimap/GraphMiniMapManager.cs | 65 +- .../GraphMinimap/GraphMinimapElement.cs | 248 ++ ...er.cs.meta => GraphMinimapElement.cs.meta} | 0 .../GraphMinimap/GraphMinimapInstance.cs | 239 +- .../GraphMinimap/GraphMinimapRenderer.cs | 182 -- .../GraphMinimap/GraphMinimapStorage.cs | 78 - .../GraphMinimap/GraphMinimapStorage.cs.meta | 2 - Editor/Internal/Patches/NesterAdaptor.cs | 180 ++ Editor/Internal/Patches/NesterAdaptor.cs.meta | 2 + .../Patches/PatchedFlowGraphEditor.cs | 178 ++ .../Patches/PatchedFlowGraphEditor.cs.meta | 2 + Editor/Internal/Patches/ProviderPatcher.cs | 12 +- Editor/Internal/Patches/StateGraphEditor.cs | 88 + .../Internal/Patches/StateGraphEditor.cs.meta | 2 + .../Processes/KeyboardControlProcess.cs | 2 +- Editor/Internal/ScriptingDefineUtility.cs | 63 +- Editor/Nodes/Events/Resources/return.png.meta | 60 +- .../Events/Resources/return@Pro.png.meta | 60 +- .../Events/Resources/return_event.png.meta | 50 +- .../Resources/return_event@Pro.png.meta | 60 +- ...=> CommunityFlowGraphContextExtensions.cs} | 29 +- ...mmunityFlowGraphContextExtensions.cs.meta} | 0 .../CommunityStateGraphContextExtensions.cs | 80 + ...mmunityStateGraphContextExtensions.cs.meta | 2 + .../Delegates/BindDelegateNodeEditor.cs | 7 + .../Delegates/DelegateInvokeNodeEditor.cs | 7 + .../Editors/Delegates/DelegateNodeEditor.cs | 9 +- .../Delegates/UnbindDelegateNodeEditor.cs | 7 + .../Dictionary/DictionaryAdaptor.cs | 506 ++-- .../Dictionary/DictionaryInspector.cs | 3 - .../Inspectors/List/DraggedListItem.cs | 9 +- .../Inspectors/List/ListAdaptor.cs | 348 +-- .../Inspectors/List/ListInspector.cs | 3 - .../Variables/GraphInspectorSession.cs | 10 + .../PatchedVariableDeclerationInspector.cs | 855 ++++-- .../PatchedVariableDeclerationsInpsector.cs | 1009 ------- .../PatchedVariableDeclerationsInspector.cs | 437 +++ ...chedVariableDeclerationsInspector.cs.meta} | 0 .../Inspectors/Variables/VariableFoldout.cs | 10 - .../Variables/VariableFoldout.cs.meta | 2 - .../Inspectors/Vector2IntInspector.cs | 46 +- .../Inspectors/Vector3IntInspector.cs | 54 +- Editor/Nodes/Fundamentals/Resources/Align.png | Bin 1897 -> 209 bytes .../Nodes/Fundamentals/Resources/Align.png~ | Bin 0 -> 190 bytes .../Fundamentals/Resources/Align@Pro.png | Bin 1627 -> 181 bytes .../Fundamentals/Resources/Align@Pro.png.meta | 35 +- .../Nodes/Fundamentals/Resources/BlueNode.png | Bin 2008 -> 448 bytes .../Fundamentals/Resources/BlueNode.png~ | Bin 0 -> 451 bytes .../Fundamentals/Resources/BlueNode@Pro.png | Bin 2078 -> 451 bytes .../Resources/BlueNode@Pro.png.meta | 2 +- .../Fundamentals/Resources/BlueNode@Pro.png~ | Bin 0 -> 446 bytes .../Resources/Branch_And.png.meta | 65 +- .../Resources/Branch_And@Pro.png.meta | 65 +- .../Resources/Branch_Equal.png.meta | 65 +- .../Resources/Branch_Equal@Pro.png.meta | 65 +- .../Resources/Branch_Greater.png.meta | 65 +- .../Resources/Branch_Greater@Pro.png.meta | 65 +- .../Resources/Branch_Greater_Equal.png.meta | 65 +- .../Branch_Greater_Equal@Pro.png.meta | 65 +- .../Resources/Branch_Less.png.meta | 65 +- .../Resources/Branch_Less@Pro.png.meta | 65 +- .../Resources/Branch_Less_Equal.png.meta | 65 +- .../Resources/Branch_Less_Equal@Pro.png.meta | 65 +- .../Fundamentals/Resources/Branch_Or.png.meta | 65 +- .../Resources/Branch_Or@Pro.png.meta | 65 +- .../Fundamentals/Resources/Distribute.png | Bin 1309 -> 216 bytes .../Fundamentals/Resources/Distribute.png~ | Bin 0 -> 208 bytes .../Fundamentals/Resources/Distribute@Pro.png | Bin 1296 -> 215 bytes .../Resources/Distribute@Pro.png.meta | 49 +- .../Resources/EditorWindow.png.meta | 50 +- .../Resources/EditorWindow_Variable.png.meta | 50 +- .../Nodes/Fundamentals/Resources/GrayNode.png | Bin 1550 -> 363 bytes .../Fundamentals/Resources/GrayNode.png~ | Bin 0 -> 389 bytes .../Fundamentals/Resources/GrayNode@Pro.png | Bin 1551 -> 361 bytes .../Resources/GrayNode@Pro.png.meta | 4 +- .../Fundamentals/Resources/GrayNode@Pro.png~ | Bin 0 -> 701 bytes .../Fundamentals/Resources/GreenNode.png | Bin 1985 -> 395 bytes .../Fundamentals/Resources/GreenNode.png~ | Bin 0 -> 1985 bytes .../Fundamentals/Resources/GreenNode@Pro.png | Bin 2046 -> 397 bytes .../Resources/GreenNode@Pro.png.meta | 14 +- .../Fundamentals/Resources/GreenNode@Pro.png~ | Bin 0 -> 645 bytes .../Fundamentals/Resources/OrangeNode.png | Bin 1944 -> 446 bytes .../Fundamentals/Resources/OrangeNode.png~ | Bin 0 -> 446 bytes .../Fundamentals/Resources/OrangeNode@Pro.png | Bin 2029 -> 446 bytes .../Resources/OrangeNode@Pro.png.meta | 2 +- .../Resources/OrangeNode@Pro.png~ | Bin 0 -> 444 bytes .../Resources/OrangeNodeSelected.png | Bin 2024 -> 0 bytes ...ed@Pro.png => OrangeNodeSelected@Pro.png~} | Bin .../Nodes/Fundamentals/Resources/RedNode.png | Bin 1828 -> 434 bytes .../Nodes/Fundamentals/Resources/RedNode.png~ | Bin 0 -> 884 bytes .../Fundamentals/Resources/RedNode@Pro.png | Bin 1943 -> 431 bytes .../Resources/RedNode@Pro.png.meta | 2 +- .../Fundamentals/Resources/RedNode@Pro.png~ | Bin 0 -> 435 bytes .../Resources/RedNodeSelected.png | Bin 2107 -> 0 bytes ...ected@Pro.png => RedNodeSelected@Pro.png~} | Bin .../Resources/SelectedBlueNode@Pro.png | Bin 0 -> 399 bytes ...png.meta => SelectedBlueNode@Pro.png.meta} | 34 +- .../Fundamentals/Resources/SelectedNode.png | Bin 2008 -> 400 bytes .../Fundamentals/Resources/SelectedNode.png~ | Bin 0 -> 2008 bytes .../Resources/SelectedNode@Pro.png | Bin 1985 -> 393 bytes .../Resources/SelectedNode@Pro.png.meta | 16 +- .../Resources/SelectedNode@Pro.png~ | Bin 0 -> 1085 bytes .../Resources/SelectedRedNode@Pro.png~ | Bin 0 -> 435 bytes .../Nodes/Fundamentals/Resources/TealNode.png | Bin 1944 -> 452 bytes .../Fundamentals/Resources/TealNode.png~ | Bin 0 -> 1944 bytes .../Fundamentals/Resources/TealNode@Pro.png | Bin 2026 -> 393 bytes .../Resources/TealNode@Pro.png.meta | 2 +- .../Fundamentals/Resources/TealNode@Pro.png~ | Bin 0 -> 460 bytes .../Resources/ValuePortConnected.png | Bin 0 -> 843 bytes ...d.png.meta => ValuePortConnected.png.meta} | 38 +- .../Resources/ValuePortConnected.png~ | Bin 0 -> 843 bytes .../Resources/ValuePortUnconnected.png | Bin 0 -> 1061 bytes ...png.meta => ValuePortUnconnected.png.meta} | 37 +- .../Resources/ValuePortUnconnected.png~ | Bin 0 -> 856 bytes .../Fundamentals/Resources/WindowIs.png.meta | 50 +- .../Fundamentals/Resources/YellowNode.png | Bin 2065 -> 438 bytes .../Fundamentals/Resources/YellowNode.png~ | Bin 0 -> 2065 bytes .../Fundamentals/Resources/YellowNode@Pro.png | Bin 2099 -> 437 bytes .../Resources/YellowNode@Pro.png.meta | 2 +- .../Resources/YellowNode@Pro.png~ | Bin 0 -> 1030 bytes .../Fundamentals/Resources/action.png.meta | 63 +- .../Resources/action_bind.png.meta | 50 +- .../Resources/action_invoke.png.meta | 63 +- .../Resources/action_unbind.png.meta | 50 +- .../Resources/arrow_switch.png.meta | 65 +- .../Resources/arrow_switch@Pro.png.meta | 65 +- .../Fundamentals/Resources/comments.png.meta | 65 +- .../Resources/comments@Pro.png.meta | 65 +- .../Fundamentals/Resources/compiler.png.meta | 58 +- .../Resources/construction.png.meta | 65 +- .../Resources/construction@Pro.png.meta | 65 +- .../Resources/construction_alarm.png.meta | 65 +- .../Resources/construction_alarm@Pro.png.meta | 65 +- .../Resources/csharp_object.png.meta | 50 +- .../Fundamentals/Resources/debug.png.meta | 65 +- .../Fundamentals/Resources/debug@Pro.png.meta | 65 +- .../Fundamentals/Resources/enum.png.meta | 50 +- .../Resources/flow_reroute.png.meta | 62 +- .../Resources/flow_reroute@Pro.png.meta | 62 +- .../Fundamentals/Resources/func.png.meta | 63 +- .../Fundamentals/Resources/func@Pro.png.meta | 63 +- .../Fundamentals/Resources/func_bind.png.meta | 50 +- .../Resources/func_invoke.png.meta | 63 +- .../Resources/func_invoke@Pro.png.meta | 63 +- .../Resources/func_unbind.png.meta | 50 +- .../Resources/maximize_window.png | Bin 0 -> 246 bytes ...@Pro.png.meta => maximize_window.png.meta} | 115 +- .../Resources/maximize_window.png~ | Bin 0 -> 245 bytes .../Resources/maximize_window@Pro.png | Bin 0 -> 243 bytes .../Resources/maximize_window@Pro.png.meta | 221 ++ .../Resources/multi_array.png.meta | 62 +- .../Resources/multi_array@Pro.png.meta | 62 +- .../Resources/value_reroute.png.meta | 62 +- .../Resources/value_reroute@Pro.png.meta | 62 +- .../Resources/variableevent.png.meta | 65 +- .../Resources/variableevent@Pro.png.meta | 65 +- .../Resources/weather_clouds.png.meta | 65 +- .../Resources/weather_clouds@Pro.png.meta | 65 +- .../Nodes/Fundamentals/Widgets/ArrowWidget.cs | 56 +- .../Fundamentals/Widgets/CommentNodeWidget.cs | 178 +- .../Widgets/FuzzyLiteralWidget.cs | 2 +- .../Fundamentals/Widgets/LiteralWidget.cs | 101 +- .../Fundamentals/Widgets/ManualEventWidget.cs | 8 +- .../PatchedWidgets/ControlConnectionWidget.cs | 52 +- .../PatchedWidgets/ControlInputWidget.cs | 8 +- .../PatchedWidgets/ControlOutputWidget.cs | 19 +- .../PatchedWidgets/HorizontalUnitWidget.cs | 1014 +++++++ .../HorizontalUnitWidget.cs.meta | 2 + .../UnifiedVariableUnitWidget.cs | 580 ++-- .../PatchedWidgets/UnitConnectionWidget.cs | 14 +- .../Widgets/PatchedWidgets/UnitPortWidget.cs | 62 +- .../Widgets/PatchedWidgets/UnitWidget.cs | 2406 ----------------- .../PatchedWidgets/UnitWidgetHelper.cs | 49 + .../PatchedWidgets/UnitWidgetHelper.cs.meta | 2 + .../PatchedWidgets/ValueConnectionWidget.cs | 142 +- .../PatchedWidgets/ValueInputWidget.cs | 34 +- .../PatchedWidgets/ValueOutputWidget.cs | 46 +- .../PatchedWidgets/VerticalUnitWidget.cs | 1279 +++++++++ ...get.cs.meta => VerticalUnitWidget.cs.meta} | 0 .../Fundamentals/Widgets/SomeValueWidget.cs | 6 - .../Widgets/StuffHappensWidget.cs | 6 - .../Nodes/Fundamentals/Widgets/TodoWidget.cs | 5 - .../Widgets/ValueRerouteWidget.cs | 74 +- .../ProjectSettingsProviderView.cs | 10 - Editor/Shared/Utility/CommunityStyles.cs | 84 +- Editor/Shared/Utility/GraphTraversal.cs | 17 + Editor/Shared/Utility/GraphUtility.cs | 128 + Editor/Shared/Utility/RectUtility.cs | 202 +- Editor/Windows/SurroundWithWindow.cs | 13 +- Editor/Windows/TypeBuilderWindow.cs | 421 +-- Editor/Windows/UtilityWindow.cs | 2 +- Editor/Windows/View/EditorWindowView.cs | 1 + Runtime/Code/AttributeDeclaration.cs | 1 + Runtime/Code/ClassAsset.cs | 1 + Runtime/Code/ClassFieldDeclaration.cs | 1 + Runtime/Code/CodeAsset.cs | 1 + Runtime/Code/FieldDeclaration.cs | 3 + Runtime/Code/FunctionNode.cs | 1 - .../Code/Generation/CodeWriter/CodeWriter.cs | 26 +- Runtime/Code/MethodDeclaration.cs | 2 + .../Code/Utility/CodeGeneratorValueUtility.cs | 97 +- .../CommunityOptionFetcher.cs | 5 + Runtime/Graph Snippets/GraphSnippet.cs | 1 + Runtime/Nodes/Events/Nodes/EveryXSeconds.cs | 7 - Runtime/Nodes/Events/Nodes/OnUnityEvent.cs | 5 + .../Nodes/Fundamentals/Control/EdgeTrigger.cs | 28 +- Runtime/Nodes/Fundamentals/Control/Gate.cs | 54 +- .../Fundamentals/Control/LimitedTrigger.cs | 23 +- Runtime/Nodes/Fundamentals/Control/Using.cs | 17 +- .../Fundamentals/Documenting/CommentNode.cs | 1 - .../Nodes/Fundamentals/Logic/Boolean/Latch.cs | 25 +- .../Fundamentals/Logic/Boolean/ToggleBool.cs | 35 +- .../Nodes/Fundamentals/Logic/Branching/If.cs | 2 +- .../String/Stringbuilder/StringbuilderUnit.cs | 2 +- Runtime/Nodes/Fundamentals/Utility/Counter.cs | 18 +- .../Fundamentals/Utility/ValueReroute.cs | 8 +- .../Constructs/Modifiers/PropertyModifier.cs | 1 + .../Constructs/AttributeGenerator.cs | 2 +- .../Constructs/PropertyGenerator.cs | 2 +- .../Operators/BinaryOperatorGenerator.cs | 1 - .../CSharp/Utilities/CodeConverter.cs | 41 +- .../Humility/Collections/DefinedDictionary.cs | 2 + .../Libraries/Humility/Color/HUMColor.cs | 4 +- .../Humility/Type/HUMType_Children.cs | 43 +- .../Humility/Type/Objects/SystemType.cs | 1 + .../Humility/Values/HUMValue_Root.cs | 34 +- Runtime/Shared/Utility/DefinedEventType.cs | 1 + Runtime/Shared/Utility/EditorState.cs | 5 + Runtime/Shared/Utility/HDRColor.cs | 7 +- Runtime/Shared/Utility/MemberUtility.cs | 49 +- Runtime/Shared/Utility/TypeParam.cs | 2 + 339 files changed, 12990 insertions(+), 7866 deletions(-) create mode 100644 Editor/Code/Generators/Nodes/Logic/BinaryOperatorGenerator.cs create mode 100644 Editor/Code/Generators/Nodes/Logic/BinaryOperatorGenerator.cs.meta create mode 100644 Editor/Code/Generators/Nodes/Logic/LogicalOperatorGenerator.cs create mode 100644 Editor/Code/Generators/Nodes/Logic/LogicalOperatorGenerator.cs.meta create mode 100644 Editor/Internal/Patches/GraphMinimap/GraphMinimapElement.cs rename Editor/Internal/Patches/GraphMinimap/{GraphMinimapRenderer.cs.meta => GraphMinimapElement.cs.meta} (100%) delete mode 100644 Editor/Internal/Patches/GraphMinimap/GraphMinimapRenderer.cs delete mode 100644 Editor/Internal/Patches/GraphMinimap/GraphMinimapStorage.cs delete mode 100644 Editor/Internal/Patches/GraphMinimap/GraphMinimapStorage.cs.meta create mode 100644 Editor/Internal/Patches/NesterAdaptor.cs create mode 100644 Editor/Internal/Patches/NesterAdaptor.cs.meta create mode 100644 Editor/Internal/Patches/PatchedFlowGraphEditor.cs create mode 100644 Editor/Internal/Patches/PatchedFlowGraphEditor.cs.meta create mode 100644 Editor/Internal/Patches/StateGraphEditor.cs create mode 100644 Editor/Internal/Patches/StateGraphEditor.cs.meta rename Editor/Nodes/Fundamentals/{CommunityGraphContextExtensions.cs => CommunityFlowGraphContextExtensions.cs} (64%) rename Editor/Nodes/Fundamentals/{CommunityGraphContextExtensions.cs.meta => CommunityFlowGraphContextExtensions.cs.meta} (100%) create mode 100644 Editor/Nodes/Fundamentals/CommunityStateGraphContextExtensions.cs create mode 100644 Editor/Nodes/Fundamentals/CommunityStateGraphContextExtensions.cs.meta delete mode 100644 Editor/Nodes/Fundamentals/Inspectors/Variables/PatchedVariableDeclerationsInpsector.cs create mode 100644 Editor/Nodes/Fundamentals/Inspectors/Variables/PatchedVariableDeclerationsInspector.cs rename Editor/Nodes/Fundamentals/Inspectors/Variables/{PatchedVariableDeclerationsInpsector.cs.meta => PatchedVariableDeclerationsInspector.cs.meta} (100%) delete mode 100644 Editor/Nodes/Fundamentals/Inspectors/Variables/VariableFoldout.cs delete mode 100644 Editor/Nodes/Fundamentals/Inspectors/Variables/VariableFoldout.cs.meta create mode 100644 Editor/Nodes/Fundamentals/Resources/Align.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/BlueNode.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/BlueNode@Pro.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/Distribute.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/GrayNode.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/GrayNode@Pro.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/GreenNode.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/GreenNode@Pro.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/OrangeNode.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/OrangeNode@Pro.png~ delete mode 100644 Editor/Nodes/Fundamentals/Resources/OrangeNodeSelected.png rename Editor/Nodes/Fundamentals/Resources/{OrangeNodeSelected@Pro.png => OrangeNodeSelected@Pro.png~} (100%) create mode 100644 Editor/Nodes/Fundamentals/Resources/RedNode.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/RedNode@Pro.png~ delete mode 100644 Editor/Nodes/Fundamentals/Resources/RedNodeSelected.png rename Editor/Nodes/Fundamentals/Resources/{RedNodeSelected@Pro.png => RedNodeSelected@Pro.png~} (100%) create mode 100644 Editor/Nodes/Fundamentals/Resources/SelectedBlueNode@Pro.png rename Editor/Nodes/Fundamentals/Resources/{RedNodeSelected.png.meta => SelectedBlueNode@Pro.png.meta} (82%) create mode 100644 Editor/Nodes/Fundamentals/Resources/SelectedNode.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/SelectedNode@Pro.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/SelectedRedNode@Pro.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/TealNode.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/TealNode@Pro.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/ValuePortConnected.png rename Editor/Nodes/Fundamentals/Resources/{OrangeNodeSelected.png.meta => ValuePortConnected.png.meta} (81%) create mode 100644 Editor/Nodes/Fundamentals/Resources/ValuePortConnected.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/ValuePortUnconnected.png rename Editor/Nodes/Fundamentals/Resources/{RedNodeSelected@Pro.png.meta => ValuePortUnconnected.png.meta} (80%) create mode 100644 Editor/Nodes/Fundamentals/Resources/ValuePortUnconnected.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/YellowNode.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/YellowNode@Pro.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/maximize_window.png rename Editor/Nodes/Fundamentals/Resources/{OrangeNodeSelected@Pro.png.meta => maximize_window.png.meta} (57%) create mode 100644 Editor/Nodes/Fundamentals/Resources/maximize_window.png~ create mode 100644 Editor/Nodes/Fundamentals/Resources/maximize_window@Pro.png create mode 100644 Editor/Nodes/Fundamentals/Resources/maximize_window@Pro.png.meta create mode 100644 Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/HorizontalUnitWidget.cs create mode 100644 Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/HorizontalUnitWidget.cs.meta delete mode 100644 Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitWidget.cs create mode 100644 Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitWidgetHelper.cs create mode 100644 Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitWidgetHelper.cs.meta create mode 100644 Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/VerticalUnitWidget.cs rename Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/{UnitWidget.cs.meta => VerticalUnitWidget.cs.meta} (100%) diff --git a/Editor/Code/CSharpPreviewWindow/CSharpPreviewWindow.cs b/Editor/Code/CSharpPreviewWindow/CSharpPreviewWindow.cs index b87cc135..b88d73eb 100644 --- a/Editor/Code/CSharpPreviewWindow/CSharpPreviewWindow.cs +++ b/Editor/Code/CSharpPreviewWindow/CSharpPreviewWindow.cs @@ -46,17 +46,54 @@ public static void Open() window = win; } + private IGraph SelectedGraph; + private void OnEnable() { window = this; Selection.selectionChanged += OnSelectionChanged; OnSelectionChanged(); UpdateCodeDisplay(); + + GraphWindow.activeContextChanged += ActiveContextChanged; + + var activeContext = GraphWindow.activeContext; + if (activeContext != null) + { + ActiveContextChanged(activeContext); + } } private void OnDisable() { Selection.selectionChanged -= OnSelectionChanged; + if (SelectedGraph != null) + { + SelectedGraph.elements.CollectionChanged -= WatchElements; + } + GraphWindow.activeContextChanged -= ActiveContextChanged; + } + + private void ActiveContextChanged(IGraphContext context) + { + if (context == null) return; + + if (SelectedGraph != null) + { + SelectedGraph.elements.CollectionChanged -= WatchElements; + } + + SelectedGraph = context.graph; + + SelectedGraph.elements.CollectionChanged += WatchElements; + } + + private void WatchElements() + { + if (!Serialization.isSerializing) + RefreshPreview(); + else + EditorApplication.delayCall += () => RefreshPreview(); } private void OnSelectionChanged() diff --git a/Editor/Code/Descriptors/Nodes/AssetFieldUnitDescriptor.cs b/Editor/Code/Descriptors/Nodes/AssetFieldUnitDescriptor.cs index c49d5670..1e8fede7 100644 --- a/Editor/Code/Descriptors/Nodes/AssetFieldUnitDescriptor.cs +++ b/Editor/Code/Descriptors/Nodes/AssetFieldUnitDescriptor.cs @@ -17,22 +17,34 @@ public AssetFieldUnitDescriptor(AssetFieldUnit target) : base(target) protected override string DefinedSurtitle() { - return target.field.parentAsset.title; + if (target.field) + return target.field.parentAsset.title; + else + return base.DefinedSurtitle(); } protected override EditorTexture DefinedIcon() { - return target.field.type.Icon(); + if (target.field) + return target.field.type.Icon(); + else + return BoltCore.Icons.errorState; } protected override string DefinedTitle() { - return target.field.parentAsset.title + "." + target.field.FieldName; + if (target.field) + return target.field.parentAsset.title + "." + target.field.FieldName; + else + return "No Field Assigned"; } protected override string DefinedShortTitle() { - return target.field.FieldName; + if (target.field) + return target.field.FieldName; + else + return base.DefinedShortTitle(); } } diff --git a/Editor/Code/Editors/ClassAssetEditor.cs b/Editor/Code/Editors/ClassAssetEditor.cs index c51c60d1..32f7ba42 100644 --- a/Editor/Code/Editors/ClassAssetEditor.cs +++ b/Editor/Code/Editors/ClassAssetEditor.cs @@ -8,6 +8,7 @@ using UnityObject = UnityEngine.Object; using System.Reflection; using System.Runtime.CompilerServices; +using UnityEngine.Assemblies; namespace Unity.VisualScripting.Community.CSharp { @@ -45,7 +46,12 @@ protected override void OnExtendedVerticalHeaderGUI() private void GetAllInheritableTypes() { - inheritTypes ??= AppDomain.CurrentDomain.GetAssemblies().SelectMany(a => a.GetTypes()).Where(t => +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else + Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif + inheritTypes ??= assemblies.SelectMany(a => a.GetTypes()).Where(t => t.Is().Inheritable() && !NameUtility.TypeHasSpecialName(t) ).ToArray(); diff --git a/Editor/Code/Editors/DelegateAssetEditor.cs b/Editor/Code/Editors/DelegateAssetEditor.cs index 8a6cb685..b23a08dd 100644 --- a/Editor/Code/Editors/DelegateAssetEditor.cs +++ b/Editor/Code/Editors/DelegateAssetEditor.cs @@ -7,6 +7,7 @@ using Unity.VisualScripting.Community.Libraries.CSharp; using System.Linq; using System.Reflection; +using UnityEngine.Assemblies; namespace Unity.VisualScripting.Community.CSharp { @@ -40,7 +41,11 @@ static Type[] BuildDelegateTypeCache() { List list = new List(); +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif for (int a = 0; a < assemblies.Length; a++) { diff --git a/Editor/Code/Editors/InterfaceAssetEditor.cs b/Editor/Code/Editors/InterfaceAssetEditor.cs index 2d61a1f7..c7372058 100644 --- a/Editor/Code/Editors/InterfaceAssetEditor.cs +++ b/Editor/Code/Editors/InterfaceAssetEditor.cs @@ -10,6 +10,7 @@ using ParameterModifier = Unity.VisualScripting.Community.Libraries.CSharp.ParameterModifier; using System; using System.Collections; +using UnityEngine.Assemblies; namespace Unity.VisualScripting.Community.CSharp { @@ -43,7 +44,13 @@ protected override void OnEnable() } shouldUpdate = true; - allTypes = AppDomain.CurrentDomain.GetAssemblies().SelectMany(assembly => assembly.GetTypes()).ToArray(); +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else + Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif + + allTypes = assemblies.SelectMany(assembly => assembly.GetTypes()).ToArray(); CacheConstrainedAttributes(); } diff --git a/Editor/Code/Editors/MemberTypeAssetEditor.cs b/Editor/Code/Editors/MemberTypeAssetEditor.cs index 80a16923..a3d524b3 100644 --- a/Editor/Code/Editors/MemberTypeAssetEditor.cs +++ b/Editor/Code/Editors/MemberTypeAssetEditor.cs @@ -8,6 +8,7 @@ using Unity.VisualScripting.Community.Utility; using UnityEditor; using UnityEngine; +using UnityEngine.Assemblies; using ParameterModifier = Unity.VisualScripting.Community.Libraries.CSharp.ParameterModifier; namespace Unity.VisualScripting.Community.CSharp @@ -19,7 +20,7 @@ public abstract class MemberTypeAssetEditor AttributeParameters; protected Metadata attributes; @@ -712,7 +713,13 @@ protected override void OnEnable() if (Target.icon == null) Target.icon = DefaultIcon(); - allTypes = AppDomain.CurrentDomain.GetAssemblies() +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else + Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif + + allTypes = assemblies .SelectMany(assembly => assembly.GetTypes()).ToArray(); CacheConstrainedAttributes(); diff --git a/Editor/Code/Generators/BaseGraphGenerator.cs b/Editor/Code/Generators/BaseGraphGenerator.cs index 51621e2e..ef3a4933 100644 --- a/Editor/Code/Generators/BaseGraphGenerator.cs +++ b/Editor/Code/Generators/BaseGraphGenerator.cs @@ -437,7 +437,7 @@ private void GenerateEventMethods(ClassGenerator @class) if (i != 0) writer.NewLine(); WriteMethodBody(unit, data, inner); } - }); + }).NewLine(); } if (focusFalseUnits.Count > 0) @@ -452,7 +452,7 @@ private void GenerateEventMethods(ClassGenerator @class) if (i != 0) writer.NewLine(); WriteMethodBody(unit, data, inner); } - }); + }).NewLine(); } }); @@ -478,7 +478,7 @@ private void GenerateEventMethods(ClassGenerator @class) if (i != 0) writer.NewLine(); WriteMethodBody(unit, data, inner); } - }); + }).NewLine(); } if (pauseFalseUnits.Count > 0) @@ -493,7 +493,7 @@ private void GenerateEventMethods(ClassGenerator @class) if (i != 0) writer.NewLine(); WriteMethodBody(unit, data, inner); } - }); + }).NewLine(); } }); @@ -553,7 +553,6 @@ Unit is OnApplicationResume || specialUnitCode = GenerateSpecialUnitCode(@class, false); } #endif - if (isCoroutine) { string coroutineMethodName = GetMethodName(unit, true); @@ -588,7 +587,7 @@ Unit is OnApplicationResume || if (!methodBodies.TryGetValue(unityMethodName, out var unityMethod)) { - unityMethod = MethodGenerator.Method(AccessModifier.Private, MethodModifier.None, typeof(void), unityMethodName); + unityMethod = MethodGenerator.Method(generator?.AccessModifier ?? AccessModifier.Private, MethodModifier.None, typeof(void), unityMethodName); unityMethod.SetOwner(Unit); if (Unit is BoltNamedAnimationEvent || Unit is BoltAnimationEvent || Unit is BoltUnityEvent) { @@ -656,7 +655,7 @@ Unit is OnApplicationResume || if (!methodBodies.TryGetValue(unityMethodName, out var method)) { - method = MethodGenerator.Method(AccessModifier.Private, MethodModifier.None, typeof(void), unityMethodName); + method = MethodGenerator.Method(generator?.AccessModifier ?? AccessModifier.Private, MethodModifier.None, typeof(void), unityMethodName); method.SetOwner(Unit); if (Unit is BoltNamedAnimationEvent || Unit is BoltAnimationEvent || Unit is BoltUnityEvent) { diff --git a/Editor/Code/Generators/GameObjectGenerator.cs b/Editor/Code/Generators/GameObjectGenerator.cs index 98158aa4..5d778dae 100644 --- a/Editor/Code/Generators/GameObjectGenerator.cs +++ b/Editor/Code/Generators/GameObjectGenerator.cs @@ -11,7 +11,6 @@ namespace Unity.VisualScripting.Community.CSharp { - [Serializable] [CodeGenerator(typeof(GameObject))] public sealed class GameObjectGenerator : BaseGraphGenerator { diff --git a/Editor/Code/Generators/Nodes/Collections/AddListItemGenerator.cs b/Editor/Code/Generators/Nodes/Collections/AddListItemGenerator.cs index 22baf500..0dbd123f 100644 --- a/Editor/Code/Generators/Nodes/Collections/AddListItemGenerator.cs +++ b/Editor/Code/Generators/Nodes/Collections/AddListItemGenerator.cs @@ -1,7 +1,3 @@ -using Unity.VisualScripting; -using System; -using Unity.VisualScripting.Community.Libraries.CSharp; - namespace Unity.VisualScripting.Community.CSharp { [NodeGenerator(typeof(AddListItem))] diff --git a/Editor/Code/Generators/Nodes/Control/CooldownGenerator.cs b/Editor/Code/Generators/Nodes/Control/CooldownGenerator.cs index 6cf79b3d..d81cda3c 100644 --- a/Editor/Code/Generators/Nodes/Control/CooldownGenerator.cs +++ b/Editor/Code/Generators/Nodes/Control/CooldownGenerator.cs @@ -41,6 +41,14 @@ protected override void GenerateControlInternal(ControlInput input, ControlGener return; } + if (input == Unit.reset) + { + writer.WriteIndented(); + writer.InvokeMember(variableName.VariableHighlight(), "ResetCooldown"); + writer.WriteEnd(EndWriteOptions.LineEnd); + return; + } + if (!data.scopeGeneratorData.TryGetValue(Unit.enter, out _)) { data.scopeGeneratorData.Add(Unit.enter, true); @@ -66,12 +74,6 @@ protected override void GenerateControlInternal(ControlInput input, ControlGener writer.Action(() => GenerateValue(Unit.unscaledTime, data, writer))); writer.WriteEnd(EndWriteOptions.LineEnd); } - else if (input == Unit.reset) - { - writer.WriteIndented(); - writer.InvokeMember(variableName.VariableHighlight(), "ResetCooldown"); - writer.WriteEnd(EndWriteOptions.LineEnd); - } GenerateActionMethod(Unit.exitReady, data, writer); GenerateActionMethod(Unit.exitNotReady, data, writer); diff --git a/Editor/Code/Generators/Nodes/Control/ForEachGenerator.cs b/Editor/Code/Generators/Nodes/Control/ForEachGenerator.cs index 57b775ad..06a70518 100644 --- a/Editor/Code/Generators/Nodes/Control/ForEachGenerator.cs +++ b/Editor/Code/Generators/Nodes/Control/ForEachGenerator.cs @@ -48,6 +48,8 @@ protected override void GenerateControlInternal(ControlInput input, ControlGener variableName = data.AddLocalNameInScope("item", typeof(object), true); } + data.CreateSymbol(Unit, elementType); + writer.WriteIndented("foreach ".ControlHighlight()); writer.Parentheses(w => { @@ -96,20 +98,58 @@ protected override void GenerateControlInternal(ControlInput input, ControlGener protected override void GenerateValueInternal(ValueOutput output, ControlGenerationData data, CodeWriter writer) { + var expectedType = data.GetExpectedType(); + if (output == Unit.currentItem) { if (!data.ContainsNameInAncestorScope(variableName)) { - writer.WriteErrorDiagnostic($"{variableName}, can only be used inside the loop.", $"Could not find or access {variableName}"); + writer.WriteErrorDiagnostic($"{variableName}, can only be used inside the loop.", $"Could not find or access {variableName}", WriteOptions.IndentedNewLineAfter); return; } + if (Unit.dictionary) { writer.GetMember(variableName.VariableHighlight(), "Value"); + + if (expectedType == null) return; + + if (data.TryGetSymbol(Unit, out var symbol)) + { + var type = symbol.Type; + if (type.IsGenericType) + { + var itemType = type.GetGenericArguments()[1]; + + if (expectedType.IsAssignableFrom(itemType)) + data.MarkExpectedTypeMet(resolvedAs: itemType); + } + else if (type == typeof(DictionaryEntry)) + { + if (expectedType.IsAssignableFrom(typeof(object))) + data.MarkExpectedTypeMet(resolvedAs: typeof(object)); + } + else if (expectedType.IsAssignableFrom(type)) + { + data.MarkExpectedTypeMet(resolvedAs: type); + } + } } else { writer.Write(variableName.VariableHighlight()); + + if (expectedType == null) return; + + if (data.TryGetSymbol(Unit, out var symbol)) + { + var type = symbol.Type; + + if (expectedType.IsAssignableFrom(type)) + { + data.MarkExpectedTypeMet(resolvedAs: type); + } + } } return; @@ -117,16 +157,47 @@ protected override void GenerateValueInternal(ValueOutput output, ControlGenerat if (output == Unit.currentKey) { + if (!data.ContainsNameInAncestorScope(variableName)) { - writer.WriteErrorDiagnostic($"{variableName}, can only be used inside the loop.", $"Could not find or access {variableName}"); + writer.WriteErrorDiagnostic($"{variableName}, can only be used inside the loop.", $"Could not find or access {variableName}", WriteOptions.IndentedNewLineAfter); return; } + writer.GetMember(variableName.VariableHighlight(), "Key"); + + if (expectedType == null) return; + + if (data.TryGetSymbol(Unit, out var symbol)) + { + var type = symbol.Type; + if (type.IsGenericType) + { + var itemType = type.GetGenericArguments()[0]; + + if (expectedType.IsAssignableFrom(itemType)) + data.MarkExpectedTypeMet(resolvedAs: itemType); + } + else if (type == typeof(DictionaryEntry)) + { + if (expectedType.IsAssignableFrom(typeof(object))) + data.MarkExpectedTypeMet(resolvedAs: typeof(object)); + } + else if (expectedType.IsAssignableFrom(type)) + { + data.MarkExpectedTypeMet(resolvedAs: type); + } + } + return; } writer.Write(currentIndex.VariableHighlight()); + + if (expectedType != null && expectedType.IsAssignableFrom(typeof(int))) + { + data.MarkExpectedTypeMet(resolvedAs: typeof(int)); + } } protected override void GenerateValueInternal(ValueInput input, ControlGenerationData data, CodeWriter writer) diff --git a/Editor/Code/Generators/Nodes/Control/SwitchOnIntegerGenerator.cs b/Editor/Code/Generators/Nodes/Control/SwitchOnIntegerGenerator.cs index d611f859..d0a33a22 100644 --- a/Editor/Code/Generators/Nodes/Control/SwitchOnIntegerGenerator.cs +++ b/Editor/Code/Generators/Nodes/Control/SwitchOnIntegerGenerator.cs @@ -60,15 +60,15 @@ protected override void GenerateControlInternal(ControlInput input, ControlGener data.SetHasBroke(false); if (values[i].Value.hasValidConnection) { - data.NewScope(); - GenerateChildControl(values[i].Value, data, writer); - data.ExitScope(); + using (writer.IndentedScope(data)) + { + GenerateChildControl(values[i].Value, data, writer); + } } if ((data.MustBreak && !data.HasBroke) || (data.MustReturn && !data.HasReturned)) { - writer.WriteIndented(); - writer.Write("break".ControlHighlight()); + writer.WriteIndented("break".ControlHighlight(), 1); writer.Write(";"); writer.NewLine(); } @@ -84,15 +84,15 @@ protected override void GenerateControlInternal(ControlInput input, ControlGener data.SetHasBroke(false); if (Unit.@default.hasValidConnection) { - data.NewScope(); - GenerateChildControl(Unit.@default, data, writer); - data.ExitScope(); + using (writer.IndentedScope(data)) + { + GenerateChildControl(Unit.@default, data, writer); + } } if ((data.MustBreak && !data.HasBroke) || (data.MustReturn && !data.HasReturned)) { - writer.WriteIndented(); - writer.Write("break".ControlHighlight()); + writer.WriteIndented("break".ControlHighlight(), 1); writer.Write(";"); writer.NewLine(); } diff --git a/Editor/Code/Generators/Nodes/Control/TriggerReturnEventGenerator.cs b/Editor/Code/Generators/Nodes/Control/TriggerReturnEventGenerator.cs index b689a184..cc4f216f 100644 --- a/Editor/Code/Generators/Nodes/Control/TriggerReturnEventGenerator.cs +++ b/Editor/Code/Generators/Nodes/Control/TriggerReturnEventGenerator.cs @@ -144,7 +144,6 @@ protected override void GenerateControlInternal(ControlInput input, ControlGener public IEnumerable GetRequiredVariables(ControlGenerationData data) { - name = data.AddLocalNameInScope(name, typeof(object)); var field = FieldGenerator.Field(AccessModifier.Private, FieldModifier.None, typeof(object), name); yield return field; } diff --git a/Editor/Code/Generators/Nodes/Control/TryCatchGenerator.cs b/Editor/Code/Generators/Nodes/Control/TryCatchGenerator.cs index 5517a56d..7760acc2 100644 --- a/Editor/Code/Generators/Nodes/Control/TryCatchGenerator.cs +++ b/Editor/Code/Generators/Nodes/Control/TryCatchGenerator.cs @@ -33,7 +33,7 @@ protected override void GenerateControlInternal(ControlInput input, ControlGener if (!Unit.@catch.hasValidConnection && !Unit.@finally.hasValidConnection) { using (writer.CodeDiagnosticScope("Catch or Finally requires connection", CodeDiagnosticKind.Warning)) - writer.Error("Expected catch or finally block"); + writer.Error("Expected catch or finally block", WriteOptions.IndentedNewLineAfter); return; } diff --git a/Editor/Code/Generators/Nodes/Control/WaitForManualPressGenerator.cs b/Editor/Code/Generators/Nodes/Control/WaitForManualPressGenerator.cs index 8323ab04..eb782092 100644 --- a/Editor/Code/Generators/Nodes/Control/WaitForManualPressGenerator.cs +++ b/Editor/Code/Generators/Nodes/Control/WaitForManualPressGenerator.cs @@ -36,7 +36,7 @@ protected override void GenerateControlInternal(ControlInput input, ControlGener public IEnumerable GetRequiredMethods(ControlGenerationData data) { var method = MethodGenerator.Method(AccessModifier.Private, MethodModifier.None, typeof(void), data.AddMethodName("WaitForPress")); - method.Body(w => w.Write($"{Name.VariableHighlight()} = {"false".ConstructHighlight()};").NewLine()); + method.Body(w => w.WriteIndented($"{Name.VariableHighlight()} = {"false".ConstructHighlight()};").NewLine()); var attribute = AttributeGenerator.Attribute(); attribute.AddParameter($"Trigger_{Name}"); method.AddAttribute(attribute); diff --git a/Editor/Code/Generators/Nodes/Events/CustomEvent/ChannelEventGenerator.cs b/Editor/Code/Generators/Nodes/Events/CustomEvent/ChannelEventGenerator.cs index 263d18d0..6f882472 100644 --- a/Editor/Code/Generators/Nodes/Events/CustomEvent/ChannelEventGenerator.cs +++ b/Editor/Code/Generators/Nodes/Events/CustomEvent/ChannelEventGenerator.cs @@ -5,7 +5,7 @@ using UnityEngine; using Unity.VisualScripting.Community.Utility; using Unity.VisualScripting.Community.Libraries.Humility; - +using static Unity.VisualScripting.Round; namespace Unity.VisualScripting.Community.CSharp { [NodeGenerator(typeof(ChannelEvent))] @@ -34,7 +34,8 @@ public override void GenerateAwakeCode(ControlGenerationData data, CodeWriter wr GetNormalCode(data, writer); } } - writer.Write(");"); + writer.NewLine(); + writer.Write("});", WriteOptions.IndentedNewLineAfter); } private void GetCoroutineCode(ControlGenerationData data, CodeWriter writer) diff --git a/Editor/Code/Generators/Nodes/Events/DefinedEvent/DefinedEventNodeGenerator.cs b/Editor/Code/Generators/Nodes/Events/DefinedEvent/DefinedEventNodeGenerator.cs index 8d4d978c..e2834917 100644 --- a/Editor/Code/Generators/Nodes/Events/DefinedEvent/DefinedEventNodeGenerator.cs +++ b/Editor/Code/Generators/Nodes/Events/DefinedEvent/DefinedEventNodeGenerator.cs @@ -1,11 +1,8 @@ using System; using Unity.VisualScripting.Community.Libraries.CSharp; using System.Collections.Generic; -using Unity.VisualScripting; -using UnityEngine; using Unity.VisualScripting.Community.Utility; using System.Linq; -using Unity.VisualScripting.Community.Libraries.Humility; using System.Collections; namespace Unity.VisualScripting.Community.CSharp @@ -99,7 +96,6 @@ public IEnumerable GetRequiredMethods(ControlGenerationData dat public IEnumerable GetRequiredVariables(ControlGenerationData data) { - eventVariableName = data.AddLocalNameInScope(eventVariableName); var field = FieldGenerator.Field(AccessModifier.Private, FieldModifier.None, typeof(IDisposable), eventVariableName); yield return field; } diff --git a/Editor/Code/Generators/Nodes/Events/DefinedEvent/GlobalDefinedEventNodeGenerator.cs b/Editor/Code/Generators/Nodes/Events/DefinedEvent/GlobalDefinedEventNodeGenerator.cs index f68cf096..4538b253 100644 --- a/Editor/Code/Generators/Nodes/Events/DefinedEvent/GlobalDefinedEventNodeGenerator.cs +++ b/Editor/Code/Generators/Nodes/Events/DefinedEvent/GlobalDefinedEventNodeGenerator.cs @@ -97,7 +97,6 @@ public IEnumerable GetRequiredMethods(ControlGenerationData dat public IEnumerable GetRequiredVariables(ControlGenerationData data) { - eventVariableName = data.AddLocalNameInScope(eventVariableName); var field = FieldGenerator.Field(AccessModifier.Private, FieldModifier.None, typeof(IDisposable), eventVariableName); yield return field; } diff --git a/Editor/Code/Generators/Nodes/Events/Listeners/OnEveryXSecondsGenerator.cs b/Editor/Code/Generators/Nodes/Events/Listeners/OnEveryXSecondsGenerator.cs index 3eb16823..2a757e3c 100644 --- a/Editor/Code/Generators/Nodes/Events/Listeners/OnEveryXSecondsGenerator.cs +++ b/Editor/Code/Generators/Nodes/Events/Listeners/OnEveryXSecondsGenerator.cs @@ -42,7 +42,6 @@ public override void GenerateUpdateCode(ControlGenerationData data, CodeWriter w public IEnumerable GetRequiredVariables(ControlGenerationData data) { - name = data.AddLocalNameInScope(name.LegalMemberName(), typeof(OnEveryXSecondsLogic)); var variable = FieldGenerator.Field(AccessModifier.Private, FieldModifier.None, typeof(OnEveryXSecondsLogic), name); variable.Default(new OnEveryXSecondsLogic()); variable.SetNewlineLiteral(false); diff --git a/Editor/Code/Generators/Nodes/Events/Listeners/OnRetrievedGenerator.cs b/Editor/Code/Generators/Nodes/Events/Listeners/OnRetrievedGenerator.cs index 9609f5e9..46fc0144 100644 --- a/Editor/Code/Generators/Nodes/Events/Listeners/OnRetrievedGenerator.cs +++ b/Editor/Code/Generators/Nodes/Events/Listeners/OnRetrievedGenerator.cs @@ -30,8 +30,10 @@ protected override void GenerateValueInternal(ValueOutput output, ControlGenerat public override void GenerateAwakeCode(ControlGenerationData data, CodeWriter writer) { + if (!Unit.trigger.hasValidConnection) return; + writer.WriteIndented(); - writer.InvokeMember(typeof(EventBus), "Register", new CodeWriter.TypeParameter[] { typeof(PoolData) }, + writer.InvokeMember(typeof(EventBus), "Register", new CodeWriter.TypeParameter[] { typeof(PoolData) }, writer.Action(() => writer.GetMember(typeof(CommunityEvents), "OnRetrieved")), writer.Action(() => writer.Write(methodName.VariableHighlight())) ); @@ -50,7 +52,8 @@ public IEnumerable GetRequiredMethods(ControlGenerationData dat methodName = data.AddMethodName(methodName); var method = MethodGenerator.Method(AccessModifier.Private, MethodModifier.None, typeof(void), methodName); method.AddParameter(ParameterGenerator.Parameter("args", typeof(PoolData), ParameterModifier.None)); - method.Body(writer => { + method.Body(writer => + { writer.WriteIndented("if".ControlHighlight()); writer.Write(" ("); writer.GetMember("args".VariableHighlight(), "pool"); diff --git a/Editor/Code/Generators/Nodes/Events/Listeners/OnReturnedGenerator.cs b/Editor/Code/Generators/Nodes/Events/Listeners/OnReturnedGenerator.cs index 7af9c849..5479c56c 100644 --- a/Editor/Code/Generators/Nodes/Events/Listeners/OnReturnedGenerator.cs +++ b/Editor/Code/Generators/Nodes/Events/Listeners/OnReturnedGenerator.cs @@ -30,8 +30,10 @@ protected override void GenerateValueInternal(ValueOutput output, ControlGenerat public override void GenerateAwakeCode(ControlGenerationData data, CodeWriter writer) { + if (!Unit.trigger.hasValidConnection) return; + writer.WriteIndented(); - writer.InvokeMember(typeof(EventBus), "Register", new CodeWriter.TypeParameter[] { typeof(PoolData) }, + writer.InvokeMember(typeof(EventBus), "Register", new CodeWriter.TypeParameter[] { typeof(PoolData) }, writer.Action(() => writer.GetMember(typeof(CommunityEvents), "OnReturned")), writer.Action(() => writer.Write(methodName.VariableHighlight())) ); @@ -50,7 +52,8 @@ public IEnumerable GetRequiredMethods(ControlGenerationData dat methodName = data.AddMethodName(methodName); var method = MethodGenerator.Method(AccessModifier.Private, MethodModifier.None, typeof(void), methodName); method.AddParameter(ParameterGenerator.Parameter("args", typeof(PoolData), ParameterModifier.None)); - method.Body(writer => { + method.Body(writer => + { writer.WriteIndented("if".ControlHighlight()); writer.Write(" ("); writer.GetMember("args".VariableHighlight(), "pool"); diff --git a/Editor/Code/Generators/Nodes/Events/ReturnEventGenerator.cs b/Editor/Code/Generators/Nodes/Events/ReturnEventGenerator.cs index 0b786a0b..9ecace7f 100644 --- a/Editor/Code/Generators/Nodes/Events/ReturnEventGenerator.cs +++ b/Editor/Code/Generators/Nodes/Events/ReturnEventGenerator.cs @@ -76,15 +76,24 @@ protected override void GenerateCode(ControlInput input, ControlGenerationData d public IEnumerable GetRequiredMethods(ControlGenerationData data) { name = data.AddMethodName(name); - var method = MethodGenerator.Method(AccessModifier.Private, MethodModifier.None, typeof(void), name); - method.AddParameter(ParameterGenerator.Parameter("args", typeof(ReturnEventArg), ParameterModifier.None)); + var runnerMethod = MethodGenerator.Method(AccessModifier.Private, MethodModifier.None, typeof(void), name); + runnerMethod.AddParameter(ParameterGenerator.Parameter("args", typeof(ReturnEventArg), ParameterModifier.None)); data.AddLocalNameInScope("args"); - method.Body(writer => + runnerMethod.Body(writer => { writer.WriteIndented(Unit.coroutine ? $"StartCoroutine({name}({"args".VariableHighlight()}))" : Name + $"({"args".VariableHighlight()})"); writer.Write(";"); writer.NewLine(); }); + yield return runnerMethod; + + var method = MethodGenerator.Method(AccessModifier.Private, MethodModifier.None, typeof(void), Name); + method.AddParameter(ParameterGenerator.Parameter("args", typeof(ReturnEventArg), ParameterModifier.None)); + data.AddLocalNameInScope("args"); + method.Body(writer => + { + GenerateCode(null, data, writer); + }); yield return method; } } diff --git a/Editor/Code/Generators/Nodes/Events/UnityEvents/OnKeysPressedGenerator.cs b/Editor/Code/Generators/Nodes/Events/UnityEvents/OnKeysPressedGenerator.cs index 007d84aa..b64f70c8 100644 --- a/Editor/Code/Generators/Nodes/Events/UnityEvents/OnKeysPressedGenerator.cs +++ b/Editor/Code/Generators/Nodes/Events/UnityEvents/OnKeysPressedGenerator.cs @@ -61,7 +61,6 @@ protected override void GenerateCode(ControlInput input, ControlGenerationData d public IEnumerable GetRequiredVariables(ControlGenerationData data) { - name = data.AddLocalNameInScope(name.LegalMemberName(), typeof(OnMultiKeyPressLogic)); var variable = FieldGenerator.Field(AccessModifier.Private, FieldModifier.None, typeof(OnMultiKeyPressLogic), name); variable.Default(new OnMultiKeyPressLogic()); variable.SetNewlineLiteral(false); diff --git a/Editor/Code/Generators/Nodes/Inherited/Asset/Methods/AssetMethodCallUnitGenerator.cs b/Editor/Code/Generators/Nodes/Inherited/Asset/Methods/AssetMethodCallUnitGenerator.cs index 8bbf1c8a..0a072fad 100644 --- a/Editor/Code/Generators/Nodes/Inherited/Asset/Methods/AssetMethodCallUnitGenerator.cs +++ b/Editor/Code/Generators/Nodes/Inherited/Asset/Methods/AssetMethodCallUnitGenerator.cs @@ -90,7 +90,7 @@ private void GenerateArguments(CodeWriter writer, ControlGenerationData data) if (!input.hasValidConnection || (input.hasValidConnection && !input.connection.source.unit.IsValidRefUnit())) { - writer.Error($"{input.key.Replace("%", "")} needs connection to a Get Variable or Get Member unit"); + writer.Error($"{input.key.Replace("%", "")} needs connection to a Get Variable or a Settable Get Member unit"); continue; } diff --git a/Editor/Code/Generators/Nodes/Inherited/Base/Methods/BaseMethodCallGenerator.cs b/Editor/Code/Generators/Nodes/Inherited/Base/Methods/BaseMethodCallGenerator.cs index 3be5abc5..d1c9d85a 100644 --- a/Editor/Code/Generators/Nodes/Inherited/Base/Methods/BaseMethodCallGenerator.cs +++ b/Editor/Code/Generators/Nodes/Inherited/Base/Methods/BaseMethodCallGenerator.cs @@ -96,7 +96,7 @@ private void GenerateArguments(CodeWriter writer, ControlGenerationData data) if (!input.hasValidConnection || (input.hasValidConnection && !input.connection.source.unit.IsValidRefUnit())) { - writer.Error($"{input.key.Replace("%", "")} needs connection to a Get Variable or Get Member unit"); + writer.Error($"{input.key.Replace("%", "")} needs connection to a Get Variable or a Settable Get Member unit"); continue; } diff --git a/Editor/Code/Generators/Nodes/Inherited/Inherited/Methods/InheritedMethodCallGenerator.cs b/Editor/Code/Generators/Nodes/Inherited/Inherited/Methods/InheritedMethodCallGenerator.cs index a517351a..44b9f8f0 100644 --- a/Editor/Code/Generators/Nodes/Inherited/Inherited/Methods/InheritedMethodCallGenerator.cs +++ b/Editor/Code/Generators/Nodes/Inherited/Inherited/Methods/InheritedMethodCallGenerator.cs @@ -96,7 +96,7 @@ private void GenerateArguments(CodeWriter writer, ControlGenerationData data) if (!input.hasValidConnection || (input.hasValidConnection && !input.connection.source.unit.IsValidRefUnit())) { - writer.Error($"{input.key.Replace("%", "")} needs connection to a Get Variable or Get Member unit"); + writer.Error($"{input.key.Replace("%", "")} needs connection to a Get Variable or a Settable Get Member unit"); continue; } diff --git a/Editor/Code/Generators/Nodes/Logic/AndGenerator.cs b/Editor/Code/Generators/Nodes/Logic/AndGenerator.cs index a47385e7..75155a90 100644 --- a/Editor/Code/Generators/Nodes/Logic/AndGenerator.cs +++ b/Editor/Code/Generators/Nodes/Logic/AndGenerator.cs @@ -1,25 +1,12 @@ -using Unity.VisualScripting; -using Unity.VisualScripting.Community.Libraries.CSharp; - -namespace Unity.VisualScripting.Community.CSharp +namespace Unity.VisualScripting.Community.CSharp { [NodeGenerator(typeof(And))] - public sealed class AndGenerator : NodeGenerator + public sealed class AndGenerator : LogicalOperatorGenerator { - public AndGenerator(And unit) : base(unit) - { - } - - protected override void GenerateValueInternal(ValueOutput output, ControlGenerationData data, CodeWriter writer) - { - if (output == Unit.result) - { - writer.Write("("); - GenerateValue(Unit.a, data, writer); - writer.Write(" && "); - GenerateValue(Unit.b, data, writer); - writer.Write(")"); - } - } + public AndGenerator(And unit) : base(unit) { } + protected override ValueInput LeftInput => Unit.a; + protected override ValueInput RightInput => Unit.b; + protected override ValueOutput OutputPort => Unit.result; + protected override string OperatorToken => " && "; } } \ No newline at end of file diff --git a/Editor/Code/Generators/Nodes/Logic/BinaryOperatorGenerator.cs b/Editor/Code/Generators/Nodes/Logic/BinaryOperatorGenerator.cs new file mode 100644 index 00000000..f633a2c6 --- /dev/null +++ b/Editor/Code/Generators/Nodes/Logic/BinaryOperatorGenerator.cs @@ -0,0 +1,157 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using Unity.VisualScripting; +using Unity.VisualScripting.Community.Libraries.CSharp; +using UnityEngine; + +namespace Unity.VisualScripting.Community.CSharp +{ + public abstract class BinaryComparisonGenerator : NodeGenerator where TUnit : Unit + { + protected BinaryComparisonGenerator(TUnit unit) : base(unit) + { + } + + protected abstract ValueInput LeftInput { get; } + protected abstract ValueInput RightInput { get; } + protected abstract ValueOutput OutputPort { get; } + protected abstract string OperatorToken { get; } + protected abstract string OperatorMethodName { get; } + + private static readonly List NumericOrder = new List + { + typeof(int), typeof(long), typeof(float), typeof(double), typeof(decimal) + }; + + #region Custom Operator Lookup Caching + private static readonly HashSet<(Type Left, Type Right, string Method)> KnownOperators = new HashSet<(Type Left, Type Right, string Method)>(); + private static readonly HashSet<(Type Left, Type Right, string Method)> MissingOperators = new HashSet<(Type Left, Type Right, string Method)>(); + #endregion + + protected override void GenerateValueInternal(ValueOutput output, ControlGenerationData data, CodeWriter writer) + { + if (output == OutputPort) + { + var leftSourceType = GetSourceType(LeftInput, data, writer, false); + var rightSourceType = GetSourceType(RightInput, data, writer, false); + + var comparisonType = InferComparisonType(leftSourceType, rightSourceType); + + writer.Write("("); + + using (data.Expect(comparisonType)) + { + GenerateValue(LeftInput, data, writer); + } + + writer.Write(OperatorToken); + + using (data.Expect(comparisonType)) + { + GenerateValue(RightInput, data, writer); + } + + writer.Write(")"); + } + } + + protected override void GenerateValueInternal(ValueInput input, ControlGenerationData data, CodeWriter writer) + { + if (input == LeftInput || input == RightInput) + { + if (input.hasValidConnection) + { + if (input.type != typeof(object)) + { + Type actualSourceType = GetSourceType(input, data, writer, false); + Type expectedType = data.GetExpectedType(); + + if (expectedType != null && actualSourceType != null) + { + bool isStandardCsharpAssignment = expectedType.IsAssignableFrom(actualSourceType); + + ConversionUtility.ConversionType conversionType = ConversionUtility.GetRequiredConversion(actualSourceType, expectedType); + + bool isCsharpExpressionSafe = conversionType == ConversionUtility.ConversionType.Identity || + conversionType == ConversionUtility.ConversionType.Upcast || + conversionType == ConversionUtility.ConversionType.NumericImplicit || + conversionType == ConversionUtility.ConversionType.UserDefinedImplicit; + + bool naturallyCompatible = isStandardCsharpAssignment || isCsharpExpressionSafe; + + if (!naturallyCompatible) + { + writer.Write($"({writer.GetTypeNameHighlighted(expectedType)})"); + GenerateConnectedValue(input, data, writer, false); + return; + } + } + } + + GenerateConnectedValue(input, data, writer); + return; + } + + using (writer.BeginNode(input.unit as Unit)) + { + if (input.hasDefaultValue) + { + WriteDefaultValue(input, data, writer); + return; + } + + writer.Write($"/* \"{input.key} Requires Input\" */".ErrorHighlight()); + } + } + } + + private Type InferComparisonType(Type left, Type right) + { + if (left == null && right == null) return typeof(float); + if (left == null) left = typeof(object); + if (right == null) right = typeof(object); + + if (HasCustomOperator(left, right, OperatorMethodName)) return left; + if (HasCustomOperator(right, left, OperatorMethodName)) return right; + + if (left == typeof(object) && right != typeof(object)) return right; + if (right == typeof(object) && left != typeof(object)) return left; + if (left == typeof(object) && right == typeof(object)) return typeof(float); + + int leftIndex = NumericOrder.IndexOf(left); + int rightIndex = NumericOrder.IndexOf(right); + + if (leftIndex >= 0 && rightIndex >= 0) + { + return leftIndex >= rightIndex ? left : right; + } + + return left; + } + + private static bool HasCustomOperator(Type left, Type right, string methodName) + { + if (left == null || right == null || string.IsNullOrEmpty(methodName)) return false; + + var lookupKey = (left, right, methodName); + if (KnownOperators.Contains(lookupKey)) return true; + if (MissingOperators.Contains(lookupKey)) return false; + + var op = left.GetMethods(BindingFlags.Public | BindingFlags.Static) + .FirstOrDefault(m => m.Name == methodName && m.GetParameters().Length == 2 && + m.GetParameters()[0].ParameterType == left && + m.GetParameters()[1].ParameterType == right); + + if (op != null) + { + KnownOperators.Add(lookupKey); + return true; + } + + MissingOperators.Add(lookupKey); + return false; + } + } +} \ No newline at end of file diff --git a/Editor/Code/Generators/Nodes/Logic/BinaryOperatorGenerator.cs.meta b/Editor/Code/Generators/Nodes/Logic/BinaryOperatorGenerator.cs.meta new file mode 100644 index 00000000..85f61478 --- /dev/null +++ b/Editor/Code/Generators/Nodes/Logic/BinaryOperatorGenerator.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 37ebe2b5ce6a79641b4c558b9becca7d \ No newline at end of file diff --git a/Editor/Code/Generators/Nodes/Logic/EqualGenerator.cs b/Editor/Code/Generators/Nodes/Logic/EqualGenerator.cs index 0e1ee3e2..9bcfba16 100644 --- a/Editor/Code/Generators/Nodes/Logic/EqualGenerator.cs +++ b/Editor/Code/Generators/Nodes/Logic/EqualGenerator.cs @@ -6,64 +6,13 @@ namespace Unity.VisualScripting.Community.CSharp { [NodeGenerator(typeof(Equal))] - public sealed class EqualGenerator : NodeGenerator + public sealed class EqualGenerator : BinaryComparisonGenerator { - public EqualGenerator(Equal unit) : base(unit) - { - } - - protected override void GenerateValueInternal(ValueInput input, ControlGenerationData data, CodeWriter writer) - { - if (input == Unit.a) - { - if (Unit.a.hasValidConnection) - { - IDisposable expectScope = null; - if (Unit.b.hasValidConnection && NodeGeneration.IsSourceLiteral(Unit.b, out var type)) - { - expectScope = data.Expect(type); - } - - GenerateConnectedValue(Unit.a, data, writer, false); - - expectScope?.Dispose(); - return; - } - } - - if (input == Unit.b) - { - if (Unit.b.hasAnyConnection) - { - IDisposable expectScope = null; - if (Unit.a.hasValidConnection && NodeGeneration.IsSourceLiteral(Unit.a, out var type)) - { - expectScope = data.Expect(type); - } - - GenerateConnectedValue(Unit.b, data, writer, false); - - expectScope?.Dispose(); - return; - } - else if (Unit.numeric) - { - writer.Object(Unit.defaultValues["b"]); - return; - } - } - - base.GenerateValueInternal(input, data, writer); - } - - protected override void GenerateValueInternal(ValueOutput output, ControlGenerationData data, CodeWriter writer) - { - if (output == Unit.comparison) - { - GenerateValue(Unit.a, data, writer); - writer.Write(" == "); - GenerateValue(Unit.b, data, writer); - } - } + public EqualGenerator(Equal unit) : base(unit) { } + protected override ValueInput LeftInput => Unit.a; + protected override ValueInput RightInput => Unit.b; + protected override ValueOutput OutputPort => Unit.comparison; + protected override string OperatorToken => " == "; + protected override string OperatorMethodName => "op_Equality"; } } \ No newline at end of file diff --git a/Editor/Code/Generators/Nodes/Logic/ExclusiveOrGenerator.cs b/Editor/Code/Generators/Nodes/Logic/ExclusiveOrGenerator.cs index d5659967..4bd977fc 100644 --- a/Editor/Code/Generators/Nodes/Logic/ExclusiveOrGenerator.cs +++ b/Editor/Code/Generators/Nodes/Logic/ExclusiveOrGenerator.cs @@ -1,25 +1,16 @@ -using Unity.VisualScripting; -using Unity.VisualScripting.Community.Libraries.CSharp; - -namespace Unity.VisualScripting.Community.CSharp +namespace Unity.VisualScripting.Community.CSharp { [NodeGenerator(typeof(ExclusiveOr))] - public sealed class ExclusiveOrGenerator : NodeGenerator + public sealed class ExclusiveOrGenerator : BinaryComparisonGenerator { public ExclusiveOrGenerator(ExclusiveOr unit) : base(unit) { } - protected override void GenerateValueInternal(ValueOutput output, ControlGenerationData data, CodeWriter writer) - { - if (output == Unit.result) - { - writer.Write("("); - GenerateValue(Unit.a, data, writer); - writer.Write(" ^ "); - GenerateValue(Unit.b, data, writer); - writer.Write(")"); - } - } + protected override ValueInput LeftInput => Unit.a; + protected override ValueInput RightInput => Unit.b; + protected override ValueOutput OutputPort => Unit.result; + protected override string OperatorToken => " ^ "; + protected override string OperatorMethodName => "op_ExclusiveOr"; } } \ No newline at end of file diff --git a/Editor/Code/Generators/Nodes/Logic/GreaterGenerator.cs b/Editor/Code/Generators/Nodes/Logic/GreaterGenerator.cs index e47129f1..50123467 100644 --- a/Editor/Code/Generators/Nodes/Logic/GreaterGenerator.cs +++ b/Editor/Code/Generators/Nodes/Logic/GreaterGenerator.cs @@ -1,24 +1,13 @@ -using Unity.VisualScripting; -using Unity.VisualScripting.Community.Libraries.CSharp; -using Unity.VisualScripting.Community.Libraries.Humility; - -namespace Unity.VisualScripting.Community.CSharp +namespace Unity.VisualScripting.Community.CSharp { [NodeGenerator(typeof(Greater))] - public sealed class GreaterGenerator : NodeGenerator + public sealed class GreaterGenerator : BinaryComparisonGenerator { - public GreaterGenerator(Greater unit) : base(unit) - { - } - - protected override void GenerateValueInternal(ValueOutput output, ControlGenerationData data, CodeWriter writer) - { - if (output == Unit.comparison) - { - GenerateValue(Unit.a, data, writer); - writer.Write(" > "); - GenerateValue(Unit.b, data, writer); - } - } + public GreaterGenerator(Greater unit) : base(unit) { } + protected override ValueInput LeftInput => Unit.a; + protected override ValueInput RightInput => Unit.b; + protected override ValueOutput OutputPort => Unit.comparison; + protected override string OperatorToken => " > "; + protected override string OperatorMethodName => "op_GreaterThan"; } } \ No newline at end of file diff --git a/Editor/Code/Generators/Nodes/Logic/GreaterOrEqualGenerator.cs b/Editor/Code/Generators/Nodes/Logic/GreaterOrEqualGenerator.cs index e0c335c4..3c9689de 100644 --- a/Editor/Code/Generators/Nodes/Logic/GreaterOrEqualGenerator.cs +++ b/Editor/Code/Generators/Nodes/Logic/GreaterOrEqualGenerator.cs @@ -1,24 +1,13 @@ -using Unity.VisualScripting; -using Unity.VisualScripting.Community.Libraries.CSharp; -using Unity.VisualScripting.Community.Libraries.Humility; - -namespace Unity.VisualScripting.Community.CSharp +namespace Unity.VisualScripting.Community.CSharp { [NodeGenerator(typeof(GreaterOrEqual))] - public sealed class GreaterOrEqualGenerator : NodeGenerator + public sealed class GreaterOrEqualGenerator : BinaryComparisonGenerator { - public GreaterOrEqualGenerator(GreaterOrEqual unit) : base(unit) - { - } - - protected override void GenerateValueInternal(ValueOutput output, ControlGenerationData data, CodeWriter writer) - { - if (output == Unit.comparison) - { - GenerateValue(Unit.a, data, writer); - writer.Write(" >= "); - GenerateValue(Unit.b, data, writer); - } - } + public GreaterOrEqualGenerator(GreaterOrEqual unit) : base(unit) { } + protected override ValueInput LeftInput => Unit.a; + protected override ValueInput RightInput => Unit.b; + protected override ValueOutput OutputPort => Unit.comparison; + protected override string OperatorToken => " >= "; + protected override string OperatorMethodName => "op_GreaterThanOrEqual"; } } \ No newline at end of file diff --git a/Editor/Code/Generators/Nodes/Logic/LessGenerator.cs b/Editor/Code/Generators/Nodes/Logic/LessGenerator.cs index a969f9e4..5464bc29 100644 --- a/Editor/Code/Generators/Nodes/Logic/LessGenerator.cs +++ b/Editor/Code/Generators/Nodes/Logic/LessGenerator.cs @@ -1,24 +1,13 @@ -using Unity.VisualScripting; -using Unity.VisualScripting.Community.Libraries.CSharp; -using Unity.VisualScripting.Community.Libraries.Humility; - -namespace Unity.VisualScripting.Community.CSharp +namespace Unity.VisualScripting.Community.CSharp { [NodeGenerator(typeof(Less))] - public sealed class LessGenerator : NodeGenerator + public sealed class LessGenerator : BinaryComparisonGenerator { - public LessGenerator(Less unit) : base(unit) - { - } - - protected override void GenerateValueInternal(ValueOutput output, ControlGenerationData data, CodeWriter writer) - { - if (output == Unit.comparison) - { - GenerateValue(Unit.a, data, writer); - writer.Write(" < "); - GenerateValue(Unit.b, data, writer); - } - } + public LessGenerator(Less unit) : base(unit) { } + protected override ValueInput LeftInput => Unit.a; + protected override ValueInput RightInput => Unit.b; + protected override ValueOutput OutputPort => Unit.comparison; + protected override string OperatorToken => " < "; + protected override string OperatorMethodName => "op_LessThan"; } } \ No newline at end of file diff --git a/Editor/Code/Generators/Nodes/Logic/LessOrEqualGenerator.cs b/Editor/Code/Generators/Nodes/Logic/LessOrEqualGenerator.cs index 9e23639a..7e166d21 100644 --- a/Editor/Code/Generators/Nodes/Logic/LessOrEqualGenerator.cs +++ b/Editor/Code/Generators/Nodes/Logic/LessOrEqualGenerator.cs @@ -1,24 +1,13 @@ -using Unity.VisualScripting; -using Unity.VisualScripting.Community.Libraries.CSharp; -using Unity.VisualScripting.Community.Libraries.Humility; - -namespace Unity.VisualScripting.Community.CSharp +namespace Unity.VisualScripting.Community.CSharp { - [NodeGenerator(typeof(LessOrEqual))] - public sealed class LessOrEqualGenerator : NodeGenerator +[NodeGenerator(typeof(LessOrEqual))] + public sealed class LessOrEqualGenerator : BinaryComparisonGenerator { - public LessOrEqualGenerator(LessOrEqual unit) : base(unit) - { - } - - protected override void GenerateValueInternal(ValueOutput output, ControlGenerationData data, CodeWriter writer) - { - if (output == Unit.comparison) - { - GenerateValue(Unit.a, data, writer); - writer.Write(" <= "); - GenerateValue(Unit.b, data, writer); - } - } + public LessOrEqualGenerator(LessOrEqual unit) : base(unit) { } + protected override ValueInput LeftInput => Unit.a; + protected override ValueInput RightInput => Unit.b; + protected override ValueOutput OutputPort => Unit.comparison; + protected override string OperatorToken => " <= "; + protected override string OperatorMethodName => "op_LessThanOrEqual"; } } \ No newline at end of file diff --git a/Editor/Code/Generators/Nodes/Logic/LiteralGenerator.cs b/Editor/Code/Generators/Nodes/Logic/LiteralGenerator.cs index b0184730..72deb317 100644 --- a/Editor/Code/Generators/Nodes/Logic/LiteralGenerator.cs +++ b/Editor/Code/Generators/Nodes/Logic/LiteralGenerator.cs @@ -15,7 +15,7 @@ public LiteralGenerator(Literal unit) : base(unit) public override IEnumerable GetNamespaces() { - var @namespace = Unit.type?.Namespace ?? Unit.value.GetType().Namespace; + var @namespace = Unit.type?.Namespace ?? Unit.value?.GetType().Namespace; if (!string.IsNullOrEmpty(@namespace)) yield return @namespace; diff --git a/Editor/Code/Generators/Nodes/Logic/LogicalOperatorGenerator.cs b/Editor/Code/Generators/Nodes/Logic/LogicalOperatorGenerator.cs new file mode 100644 index 00000000..b99ebc59 --- /dev/null +++ b/Editor/Code/Generators/Nodes/Logic/LogicalOperatorGenerator.cs @@ -0,0 +1,56 @@ +using System; + +namespace Unity.VisualScripting.Community.CSharp +{ + public abstract class LogicalOperatorGenerator : NodeGenerator where TUnit : Unit + { + protected LogicalOperatorGenerator(TUnit unit) : base(unit) { } + + protected abstract ValueInput LeftInput { get; } + protected abstract ValueInput RightInput { get; } + protected abstract ValueOutput OutputPort { get; } + protected abstract string OperatorToken { get; } + + protected override void GenerateValueInternal(ValueOutput output, ControlGenerationData data, CodeWriter writer) + { + if (output == OutputPort) + { + writer.Write("("); + using (data.Expect(typeof(bool))) + { + GenerateValue(LeftInput, data, writer); + } + writer.Write(OperatorToken); + using (data.Expect(typeof(bool))) + { + GenerateValue(RightInput, data, writer); + } + writer.Write(")"); + } + } + + protected override void GenerateValueInternal(ValueInput input, ControlGenerationData data, CodeWriter writer) + { + if (input == LeftInput || input == RightInput) + { + if (input.hasValidConnection) + { + Type actualSourceType = GetSourceType(input, data, writer, false); + if (actualSourceType != null && actualSourceType != typeof(bool)) + { + writer.Write(writer.GetTypeNameHighlighted(typeof(bool))); + } + GenerateConnectedValue(input, data, writer); + return; + } + + if (input.hasDefaultValue) + { + WriteDefaultValue(input, data, writer); + return; + } + writer.Write("false"); + } + } + } +} \ No newline at end of file diff --git a/Editor/Code/Generators/Nodes/Logic/LogicalOperatorGenerator.cs.meta b/Editor/Code/Generators/Nodes/Logic/LogicalOperatorGenerator.cs.meta new file mode 100644 index 00000000..ee401a19 --- /dev/null +++ b/Editor/Code/Generators/Nodes/Logic/LogicalOperatorGenerator.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 02f0dcddc8734af4ba061036aeedcaa1 \ No newline at end of file diff --git a/Editor/Code/Generators/Nodes/Logic/NotEqualGenerator.cs b/Editor/Code/Generators/Nodes/Logic/NotEqualGenerator.cs index aa3524da..758cdac2 100644 --- a/Editor/Code/Generators/Nodes/Logic/NotEqualGenerator.cs +++ b/Editor/Code/Generators/Nodes/Logic/NotEqualGenerator.cs @@ -1,71 +1,13 @@ -using System; -using Unity.VisualScripting; -using Unity.VisualScripting.Community.Libraries.CSharp; -using Unity.VisualScripting.Community.Libraries.Humility; - -namespace Unity.VisualScripting.Community.CSharp +namespace Unity.VisualScripting.Community.CSharp { [NodeGenerator(typeof(NotEqual))] - public sealed class NotEqualGenerator : NodeGenerator + public sealed class NotEqualGenerator : BinaryComparisonGenerator { - public NotEqualGenerator(NotEqual unit) : base(unit) - { - } - - protected override void GenerateValueInternal(ValueInput input, ControlGenerationData data, CodeWriter writer) - { - if (input == Unit.a) - { - if (Unit.a.hasAnyConnection) - { - IDisposable expectScope = null; - if (Unit.b.hasValidConnection && Unit.b.GetPesudoSource()?.unit is Literal literal) - { - expectScope = data.Expect(literal.type); - } - base.GenerateValueInternal(Unit.a, data, writer); - if (Unit.b.hasValidConnection && Unit.b.GetPesudoSource()?.unit is Literal) - { - expectScope?.Dispose(); - } - return; - } - } - - if (input == Unit.b) - { - if (Unit.b.hasAnyConnection) - { - IDisposable expectScope = null; - if (Unit.a.hasValidConnection && Unit.a.GetPesudoSource()?.unit is Literal literal) - { - expectScope = data.Expect(literal.type); - } - base.GenerateValueInternal(Unit.b, data, writer); - if (Unit.a.hasValidConnection && Unit.a.GetPesudoSource()?.unit is Literal) - { - expectScope?.Dispose(); - } - return; - } - else if (Unit.numeric) - { - writer.Object(Unit.defaultValues["b"]); - return; - } - } - - base.GenerateValueInternal(input, data, writer); - } - - protected override void GenerateValueInternal(ValueOutput output, ControlGenerationData data, CodeWriter writer) - { - if (output == Unit.comparison) - { - GenerateValue(Unit.a, data, writer); - writer.Write(" != "); - GenerateValue(Unit.b, data, writer); - } - } + public NotEqualGenerator(NotEqual unit) : base(unit) { } + protected override ValueInput LeftInput => Unit.a; + protected override ValueInput RightInput => Unit.b; + protected override ValueOutput OutputPort => Unit.comparison; + protected override string OperatorToken => " != "; + protected override string OperatorMethodName => "op_Inequality"; } } \ No newline at end of file diff --git a/Editor/Code/Generators/Nodes/Logic/OrGenerator.cs b/Editor/Code/Generators/Nodes/Logic/OrGenerator.cs index 35880825..796f26d0 100644 --- a/Editor/Code/Generators/Nodes/Logic/OrGenerator.cs +++ b/Editor/Code/Generators/Nodes/Logic/OrGenerator.cs @@ -4,22 +4,12 @@ namespace Unity.VisualScripting.Community.CSharp { [NodeGenerator(typeof(Or))] - public sealed class OrGenerator : NodeGenerator + public sealed class OrGenerator : LogicalOperatorGenerator { - public OrGenerator(Or unit) : base(unit) - { - } - - protected override void GenerateValueInternal(ValueOutput output, ControlGenerationData data, CodeWriter writer) - { - if (output == Unit.result) - { - writer.Write("("); - GenerateValue(Unit.a, data, writer); - writer.Write(" || "); - GenerateValue(Unit.b, data, writer); - writer.Write(")"); - } - } + public OrGenerator(Or unit) : base(unit) { } + protected override ValueInput LeftInput => Unit.a; + protected override ValueInput RightInput => Unit.b; + protected override ValueOutput OutputPort => Unit.result; + protected override string OperatorToken => " || "; } } \ No newline at end of file diff --git a/Editor/Code/Generators/Nodes/Math/Round/BaseRoundGenerator.cs b/Editor/Code/Generators/Nodes/Math/Round/BaseRoundGenerator.cs index ca7dee1c..54a7568d 100644 --- a/Editor/Code/Generators/Nodes/Math/Round/BaseRoundGenerator.cs +++ b/Editor/Code/Generators/Nodes/Math/Round/BaseRoundGenerator.cs @@ -11,7 +11,7 @@ public BaseRoundGenerator(Unit unit) : base(unit) { } public override IEnumerable GetNamespaces() { - yield return $"{"static".ConstructHighlight()} Unity.VisualScripting.{"Round".TypeHighlight()}<{"float".ConstructHighlight()}` {"float".ConstructHighlight()}>"; + yield return $"{"static".ConstructHighlight()} Unity.VisualScripting.{"Round".TypeHighlight()}<{"float".ConstructHighlight()}, {"float".ConstructHighlight()}>"; } protected override void GenerateValueInternal(ValueOutput output, ControlGenerationData data, CodeWriter writer) diff --git a/Editor/Code/Generators/Nodes/Members/GetMemberGenerator.cs b/Editor/Code/Generators/Nodes/Members/GetMemberGenerator.cs index b30aea34..e28fb67a 100644 --- a/Editor/Code/Generators/Nodes/Members/GetMemberGenerator.cs +++ b/Editor/Code/Generators/Nodes/Members/GetMemberGenerator.cs @@ -13,7 +13,8 @@ public GetMemberGenerator(GetMember unit) : base(unit) public override IEnumerable GetNamespaces() { - yield return Unit.member.pseudoDeclaringType.Namespace; + if (Unit.member != null) + yield return Unit.member.pseudoDeclaringType.Namespace; yield return "Unity.VisualScripting"; } @@ -33,20 +34,7 @@ protected override void GenerateValueInternal(ValueOutput output, ControlGenerat return; } - string name; - - if (Unit.member.isField) - { - name = Unit.member.fieldInfo.Name; - } - else if (Unit.member.isProperty) - { - name = Unit.member.name; - } - else - { - name = Unit.member.ToDeclarer().ToString(); // I don't think this should be possible through normal usage. - } + string name = Unit.member.name; if (!typeof(Component).IsAssignableFrom(Unit.member.pseudoDeclaringType)) { diff --git a/Editor/Code/Generators/Nodes/Members/InvokeMemberGenerator.cs b/Editor/Code/Generators/Nodes/Members/InvokeMemberGenerator.cs index f323bc09..0c8f367e 100644 --- a/Editor/Code/Generators/Nodes/Members/InvokeMemberGenerator.cs +++ b/Editor/Code/Generators/Nodes/Members/InvokeMemberGenerator.cs @@ -1,6 +1,3 @@ -using Unity; -using Unity.VisualScripting; -using Unity.VisualScripting.Community; using System.Linq; using Unity.VisualScripting.Community.Libraries.CSharp; using System.Collections.Generic; @@ -15,13 +12,16 @@ namespace Unity.VisualScripting.Community.CSharp public sealed class InvokeMemberGenerator : LocalVariableGenerator { private InvokeMember Unit => unit as InvokeMember; - private Dictionary outputNames; + private Dictionary outputNames = new Dictionary(); public InvokeMemberGenerator(InvokeMember unit) : base(unit) { } public override IEnumerable GetNamespaces() { + if (Unit.member == null) + yield break; + if (!Unit.member.isReflected) yield break; @@ -39,7 +39,7 @@ protected override void GenerateControlInternal(ControlInput input, ControlGener { if (!Unit.member.isReflected) return; - outputNames = new Dictionary(); + bool hasResultConnection = Unit.result != null && Unit.result.hasValidConnection; if (hasResultConnection) @@ -98,7 +98,7 @@ protected override void GenerateControlInternal(ControlInput input, ControlGener if (!hasResultConnection) writer.WriteIndented(); GenerateValue(Unit.target, data, writer); - writer.Write(Unit.target.GetComponent(writer, GetSourceType(Unit.target, data, writer), Unit.target.type, true, true)); + writer.Write(Unit.target.GetComponent(writer, GetSourceType(Unit.target, data, writer), true, true)); } writer.Dot(); @@ -269,6 +269,8 @@ private void GenerateArguments(CodeWriter writer, ControlGenerationData data) { outputNames.Add(outValue, "&" + name); } + + continue; } if (input == null) @@ -287,7 +289,7 @@ private void GenerateArguments(CodeWriter writer, ControlGenerationData data) if (!input.hasValidConnection || (input.hasValidConnection && !input.connection.source.unit.IsValidRefUnit())) { - writer.Error($"{input.key.Replace("%", "")} needs connection to a Get Variable or Get Member unit"); + writer.Error($"{input.key.Replace("%", "")} needs connection to a Get Variable or a Settable Get Member unit"); continue; } diff --git a/Editor/Code/Generators/Nodes/Members/SetMemberGenerator.cs b/Editor/Code/Generators/Nodes/Members/SetMemberGenerator.cs index 7b43af5d..d9e7e016 100644 --- a/Editor/Code/Generators/Nodes/Members/SetMemberGenerator.cs +++ b/Editor/Code/Generators/Nodes/Members/SetMemberGenerator.cs @@ -17,7 +17,8 @@ public SetMemberGenerator(SetMember unit) : base(unit) public override IEnumerable GetNamespaces() { - yield return Unit.member.pseudoDeclaringType.Namespace; + if (Unit.member != null) + yield return Unit.member.pseudoDeclaringType.Namespace; } protected override void GenerateControlInternal(ControlInput input, ControlGenerationData data, CodeWriter writer) diff --git a/Editor/Code/Generators/Nodes/NodeGeneration.cs b/Editor/Code/Generators/Nodes/NodeGeneration.cs index 5bcaf4c1..4ceb38ab 100644 --- a/Editor/Code/Generators/Nodes/NodeGeneration.cs +++ b/Editor/Code/Generators/Nodes/NodeGeneration.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using Unity.VisualScripting.Community.Libraries.CSharp; -using Unity.VisualScripting.Community.Libraries.Humility; +using System.Reflection; using UnityEngine; #if VISUAL_SCRIPTING_1_7 using SUnit = Unity.VisualScripting.SubgraphUnit; @@ -89,6 +89,11 @@ public static string GetComponentCode(Type type, CodeWriter writer, bool include } } + public static string GetComponent(this ValueInput input, CodeWriter writer, Type sourceType, bool includeDot, bool includeParentheses) + { + return GetComponent(input, writer, sourceType, input.type, includeDot, includeParentheses); + } + public static string GetComponent(this ValueInput input, CodeWriter writer, Type sourceType, Type requiredType, bool includeDot, bool includeParentheses) { if (requiredType == typeof(GameObject) || !typeof(Component).IsStrictlyAssignableFrom(requiredType)) @@ -280,11 +285,41 @@ public static bool IsSourceLiteral(ValueInput valueInput, out Type sourceType) public static bool IsValidRefUnit(this Unit unit) { - return unit is GetVariable || (unit is AssetFieldUnit fieldUnit && fieldUnit.actionDirection == ActionDirection.Get) || (unit is InheritedFieldUnit inheritedField && inheritedField.actionDirection == ActionDirection.Get); + // Check if it's private would be the proper way to check this as well, + // but since you can compile the graph you are working on and use those members as a GetMember unit, + // there is no way to check if the current graph is part of the same type so private would fail even though it's valid. + // So we allow it then let the compiled script errors tell you it's invalid. + return unit is GetVariable || + (unit is GetMember getMember && getMember.member.isSettable) || + (unit is AssetFieldUnit fieldUnit && fieldUnit.actionDirection == ActionDirection.Get && !IsReadonly(fieldUnit.field)) || + (unit is InheritedFieldUnit inheritedField && inheritedField.actionDirection == ActionDirection.Get && inheritedField.member.isSettable); } + public static bool IsValidRefUnit(this IUnit unit) { return IsValidRefUnit(unit as Unit); } + + public static bool IsReadonly(FieldDeclaration declaration) + { + if (declaration.isProperty) + { + return false; + } + + return (declaration.fieldModifier & FieldModifier.Readonly) != 0; + } + + public static bool IsPrivate(Member member) + { + switch (member.info) + { + case FieldInfo f: return f.IsPrivate; + case PropertyInfo p: return p.GetScope() == AccessModifier.Private; + case MethodInfo m: return m.IsPrivate; + case ConstructorInfo c: return c.IsPrivate; + default: throw new InvalidOperationException(); + } + } } } \ No newline at end of file diff --git a/Editor/Code/Generators/Nodes/Variables/GetVariableGenerator.cs b/Editor/Code/Generators/Nodes/Variables/GetVariableGenerator.cs index d2cb2afd..306ed090 100644 --- a/Editor/Code/Generators/Nodes/Variables/GetVariableGenerator.cs +++ b/Editor/Code/Generators/Nodes/Variables/GetVariableGenerator.cs @@ -69,7 +69,10 @@ private void GenerateConnected(ControlGenerationData data, CodeWriter writer, st case VariableKind.Object: writer.Write(variablesType + ".Object("); - GenerateValue(Unit.@object, data, writer); + using (data.Expect(typeof(GameObject))) + { + GenerateValue(Unit.@object, data, writer); + } writer.Write(")"); ResolveVariableTypeSafe(VisualScripting.Variables.Object(GetTarget(data)), name, data); break; @@ -184,8 +187,10 @@ private void WriteObject(ControlGenerationData data, CodeWriter writer) writer.Write("gameObject".VariableHighlight()); return; } - - GenerateValue(Unit.@object, data, writer); + using (data.Expect(typeof(GameObject))) + { + GenerateValue(Unit.@object, data, writer); + } } private void ResolveVariableTypeSafe(VariableDeclarations declarations, string name, ControlGenerationData data) diff --git a/Editor/Code/Generators/Nodes/Variables/IsVariableDefinedGenerator.cs b/Editor/Code/Generators/Nodes/Variables/IsVariableDefinedGenerator.cs index e7c39ebc..c7d45af2 100644 --- a/Editor/Code/Generators/Nodes/Variables/IsVariableDefinedGenerator.cs +++ b/Editor/Code/Generators/Nodes/Variables/IsVariableDefinedGenerator.cs @@ -25,10 +25,10 @@ protected override void GenerateValueInternal(ValueOutput output, ControlGenerat { switch (Unit.kind) { - case VariableKind.Flow: - case VariableKind.Graph: - writer.Error($"{Unit.kind} Variables do not support connected names"); - break; + case VariableKind.Flow or VariableKind.Graph: + using (writer.CodeDiagnosticScope($"{Unit.kind} Variables cannot use IsDefined yet.", CodeDiagnosticKind.Error)) + writer.Error($"Could not generate {Unit.kind} Variable"); + return; case VariableKind.Object: writer.InvokeMember(writer.GetTypeNameHighlighted(typeof(VisualScripting.Variables)), "Object", writer.Action(() => GenerateValue(Unit.@object, data, writer))); break; diff --git a/Editor/Code/Options/CodeOptions.cs b/Editor/Code/Options/CodeOptions.cs index 6eae20fb..a0163a93 100644 --- a/Editor/Code/Options/CodeOptions.cs +++ b/Editor/Code/Options/CodeOptions.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using Unity.VisualScripting.Community.Libraries.Humility; using System.Reflection; +using UnityEngine.Assemblies; +using System.Linq; namespace Unity.VisualScripting.Community { @@ -55,8 +57,11 @@ private static IEnumerable DelegateMemberOptions() private static IEnumerable DelegateOptions() { - List result = new List(); +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif for (int assembly = 0; assembly < assemblies.Length; assembly++) { diff --git a/Editor/Code/Resources/as_32.png.meta b/Editor/Code/Resources/as_32.png.meta index 6f806e9a..490d088b 100644 --- a/Editor/Code/Resources/as_32.png.meta +++ b/Editor/Code/Resources/as_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: cba0860cc006bc240bcd4779dde2d62e TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -2974064338877788879 + second: as_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: as_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 13d4806bd300ab6d0800000000000000 + internalID: -2974064338877788879 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/binary_save_32.png.meta b/Editor/Code/Resources/binary_save_32.png.meta index fb9fe2d2..edaa99bd 100644 --- a/Editor/Code/Resources/binary_save_32.png.meta +++ b/Editor/Code/Resources/binary_save_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 8c40bba553c175947a0987482c3ba4bd TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 2362337395451753064 + second: binary_save_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: binary_save_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 862f58f4855b8c020800000000000000 + internalID: 2362337395451753064 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/class_16.png.meta b/Editor/Code/Resources/class_16.png.meta index f0417380..361a988b 100644 --- a/Editor/Code/Resources/class_16.png.meta +++ b/Editor/Code/Resources/class_16.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: bd2d069c488e09e429c95e9643376a13 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 5136859307506328807 + second: class_16_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: class_16_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 7e4e21de25ac94740800000000000000 + internalID: 5136859307506328807 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/class_32.png.meta b/Editor/Code/Resources/class_32.png.meta index 25e0f863..b56816e1 100644 --- a/Editor/Code/Resources/class_32.png.meta +++ b/Editor/Code/Resources/class_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 29f1a2d001dd6c2478b4f37041e5c63b TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 1535742641561579498 + second: class_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: class_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: aefa2b8bbcd005510800000000000000 + internalID: 1535742641561579498 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/class_variable_32.png.meta b/Editor/Code/Resources/class_variable_32.png.meta index 19b0882f..f549c7f5 100644 --- a/Editor/Code/Resources/class_variable_32.png.meta +++ b/Editor/Code/Resources/class_variable_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 596b8a49e60fb444181b8ca86a472a26 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -8309915453151023779 + second: class_variable_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: class_variable_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: d5d67655cef3dac80800000000000000 + internalID: -8309915453151023779 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/code_32.png.meta b/Editor/Code/Resources/code_32.png.meta index cf975cd4..9f38b93a 100644 --- a/Editor/Code/Resources/code_32.png.meta +++ b/Editor/Code/Resources/code_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 53b4e8a29acc8d64985064ab6100190c TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 3063646189919389351 + second: code_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: code_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 7a6cf935af1448a20800000000000000 + internalID: 3063646189919389351 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/compilation_16.png.meta b/Editor/Code/Resources/compilation_16.png.meta index 23052f61..b689c1d8 100644 --- a/Editor/Code/Resources/compilation_16.png.meta +++ b/Editor/Code/Resources/compilation_16.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 9c418f00c6d78ac4daa7036bb45a8912 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -3905950659805225713 + second: compilation_16_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: compilation_16_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: f0d5b1cc1964bc9c0800000000000000 + internalID: -3905950659805225713 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/constructor_32.png.meta b/Editor/Code/Resources/constructor_32.png.meta index 57d9f71b..ce1b1e53 100644 --- a/Editor/Code/Resources/constructor_32.png.meta +++ b/Editor/Code/Resources/constructor_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: bf905c1471bef9548a9bf65b5738fbca TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 9169414421814644406 + second: constructor_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: constructor_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 6be0b92c5dd404f70800000000000000 + internalID: 9169414421814644406 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/continue_32.png.meta b/Editor/Code/Resources/continue_32.png.meta index fee497d8..75a0e44a 100644 --- a/Editor/Code/Resources/continue_32.png.meta +++ b/Editor/Code/Resources/continue_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 7484ce1f2a21dbd44aca2fae4f464416 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -196547203969103588 + second: continue_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: continue_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c1943ddfb59b54df0800000000000000 + internalID: -196547203969103588 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/contract_32.png.meta b/Editor/Code/Resources/contract_32.png.meta index dca385bb..d35e230e 100644 --- a/Editor/Code/Resources/contract_32.png.meta +++ b/Editor/Code/Resources/contract_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 18e678980dbaf9c49b89d258a4e47ba6 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -3224015561185298376 + second: contract_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: contract_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 838f73dbdeef143d0800000000000000 + internalID: -3224015561185298376 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/enum_16.png.meta b/Editor/Code/Resources/enum_16.png.meta index 67c81465..c1f12f53 100644 --- a/Editor/Code/Resources/enum_16.png.meta +++ b/Editor/Code/Resources/enum_16.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: d96a6e03619cfc74fb9c87b3104b492f TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -6371018459737012709 + second: enum_16_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: enum_16_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: b164be947789597a0800000000000000 + internalID: -6371018459737012709 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/enum_32.png.meta b/Editor/Code/Resources/enum_32.png.meta index d0d7f2b3..64e59e7a 100644 --- a/Editor/Code/Resources/enum_32.png.meta +++ b/Editor/Code/Resources/enum_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 79dcc1d10c1d1694e8f88d4c72d953a0 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -8076274204019171322 + second: enum_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: enum_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 60069c0c66f4bef80800000000000000 + internalID: -8076274204019171322 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/event_16.png.meta b/Editor/Code/Resources/event_16.png.meta index 6fef7daf..73a7424a 100644 --- a/Editor/Code/Resources/event_16.png.meta +++ b/Editor/Code/Resources/event_16.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 8a783a49c7381764ab40d55f0c501eb7 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -3645374015234541781 + second: event_16_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: event_16_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: b27718ca5a7096dc0800000000000000 + internalID: -3645374015234541781 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/explorer_16.png.meta b/Editor/Code/Resources/explorer_16.png.meta index 62b02746..f326ed4b 100644 --- a/Editor/Code/Resources/explorer_16.png.meta +++ b/Editor/Code/Resources/explorer_16.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 668135398b43cac43b5a59f7ea4d6b62 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -1006366326623650487 + second: explorer_16_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: explorer_16_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 94dbeab682ba802f0800000000000000 + internalID: -1006366326623650487 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/flow_16.png.meta b/Editor/Code/Resources/flow_16.png.meta index 76e62d87..d4e6e072 100644 --- a/Editor/Code/Resources/flow_16.png.meta +++ b/Editor/Code/Resources/flow_16.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 1a212c8fa3a5ceb4aba702d1178432b8 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 4213229522146096564 + second: flow_16_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: flow_16_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 4b5f4b08de5687a30800000000000000 + internalID: 4213229522146096564 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/flow_32.png.meta b/Editor/Code/Resources/flow_32.png.meta index 837f9a2a..f8e5a124 100644 --- a/Editor/Code/Resources/flow_32.png.meta +++ b/Editor/Code/Resources/flow_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 7e38ff706c25aac429f210852e2daee7 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 376803717093765276 + second: flow_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: flow_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c90bb6bfbfcaa3500800000000000000 + internalID: 376803717093765276 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/flow_reroute_32.png.meta b/Editor/Code/Resources/flow_reroute_32.png.meta index 0d89c020..86e4784d 100644 --- a/Editor/Code/Resources/flow_reroute_32.png.meta +++ b/Editor/Code/Resources/flow_reroute_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: cf8d5592b2e666148ac82544ae57a450 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -8517231580325672670 + second: flow_reroute_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: flow_reroute_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 22903f00107bcc980800000000000000 + internalID: -8517231580325672670 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/getter_32.png.meta b/Editor/Code/Resources/getter_32.png.meta index 611cc7ae..55adb816 100644 --- a/Editor/Code/Resources/getter_32.png.meta +++ b/Editor/Code/Resources/getter_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: a10814ea315f4614db7834be49856a01 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 5618935849903165937 + second: getter_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: getter_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 1f19f2592687afd40800000000000000 + internalID: 5618935849903165937 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/interface_16.png.meta b/Editor/Code/Resources/interface_16.png.meta index 14c9b7fe..dde8bff0 100644 --- a/Editor/Code/Resources/interface_16.png.meta +++ b/Editor/Code/Resources/interface_16.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 04da9586950244049b1047e96b1b8249 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 8552085680574846951 + second: interface_16_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: interface_16_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 7e75e579d9c1fa670800000000000000 + internalID: 8552085680574846951 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/interface_32.png.meta b/Editor/Code/Resources/interface_32.png.meta index 275dcedc..2ce28d24 100644 --- a/Editor/Code/Resources/interface_32.png.meta +++ b/Editor/Code/Resources/interface_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 45d6ab60acb0b1c4cace40b6f4fac1e8 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 6994543792497559194 + second: interface_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: interface_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a960bb5458c911160800000000000000 + internalID: 6994543792497559194 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/invoke_32.png.meta b/Editor/Code/Resources/invoke_32.png.meta index 7825c102..cebea2d0 100644 --- a/Editor/Code/Resources/invoke_32.png.meta +++ b/Editor/Code/Resources/invoke_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 8a52683073358d14389b10a3a0d2c7c4 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 2471359966844614171 + second: invoke_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: invoke_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: b16f4e7cbc80c4220800000000000000 + internalID: 2471359966844614171 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/is_unit@32x.png.meta b/Editor/Code/Resources/is_unit@32x.png.meta index 78933f91..776eb3b0 100644 --- a/Editor/Code/Resources/is_unit@32x.png.meta +++ b/Editor/Code/Resources/is_unit@32x.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 04a768f038c59d14b8ee87ad38c89836 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 8586246596241852132 + second: is_unit@32x_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: is_unit@32x_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 4e607e299c9782770800000000000000 + internalID: 8586246596241852132 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/label_unit@32x.png.meta b/Editor/Code/Resources/label_unit@32x.png.meta index 8d808cf8..6e51d425 100644 --- a/Editor/Code/Resources/label_unit@32x.png.meta +++ b/Editor/Code/Resources/label_unit@32x.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 7d5284d198d006c45a56b53326215692 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -6632537290234030704 + second: label_unit@32x_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: label_unit@32x_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 0959118a97e74f3a0800000000000000 + internalID: -6632537290234030704 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/lock_32.png.meta b/Editor/Code/Resources/lock_32.png.meta index e35ad03d..2036dce9 100644 --- a/Editor/Code/Resources/lock_32.png.meta +++ b/Editor/Code/Resources/lock_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 275dd874966b848469dd2ca028143d36 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 9143276424040641426 + second: lock_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: lock_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 293752ae67173ee70800000000000000 + internalID: 9143276424040641426 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/method_16.png.meta b/Editor/Code/Resources/method_16.png.meta index 99159161..721b8e6c 100644 --- a/Editor/Code/Resources/method_16.png.meta +++ b/Editor/Code/Resources/method_16.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 15d4c6956094dc64fbb29142b53422ee TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 5599691170854187044 + second: method_16_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -51,7 +56,9 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 @@ -62,8 +69,10 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -73,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -85,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: method_16_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 420b7a2937916bd40800000000000000 + internalID: 5599691170854187044 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -100,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/multi_array_32.png.meta b/Editor/Code/Resources/multi_array_32.png.meta index 2dc11832..64b08d7e 100644 --- a/Editor/Code/Resources/multi_array_32.png.meta +++ b/Editor/Code/Resources/multi_array_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 7bd2d24859e5a9743af050431badd5f8 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 5489744347939934782 + second: multi_array_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: multi_array_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e321ba6066d7f2c40800000000000000 + internalID: 5489744347939934782 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/object_32.png.meta b/Editor/Code/Resources/object_32.png.meta index adb36f60..1fbfe673 100644 --- a/Editor/Code/Resources/object_32.png.meta +++ b/Editor/Code/Resources/object_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 31dd71f2d367974449cc07e1d6917732 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -7875068625388908043 + second: object_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -51,7 +56,9 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 @@ -62,8 +69,10 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -73,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -85,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: object_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 5f1ded12fc226b290800000000000000 + internalID: -7875068625388908043 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -100,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/okay_32.png.meta b/Editor/Code/Resources/okay_32.png.meta index 102ea7b3..b21db3db 100644 --- a/Editor/Code/Resources/okay_32.png.meta +++ b/Editor/Code/Resources/okay_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 8c84a5927ced61b438f239e2afa19b9a TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -1704864146449301323 + second: okay_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: okay_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 5b00790771b1758e0800000000000000 + internalID: -1704864146449301323 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/override_16.png.meta b/Editor/Code/Resources/override_16.png.meta index dbe71aa2..58222a18 100644 --- a/Editor/Code/Resources/override_16.png.meta +++ b/Editor/Code/Resources/override_16.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 47812b89c01f16246891efb73e867deb TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 3518903816916485032 + second: override_16_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: override_16_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 8a3c216a068a5d030800000000000000 + internalID: 3518903816916485032 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/override_32.png.meta b/Editor/Code/Resources/override_32.png.meta index be6b049b..d7d108f8 100644 --- a/Editor/Code/Resources/override_32.png.meta +++ b/Editor/Code/Resources/override_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 02e22fdf19b338a43aeb32aa4f84cda6 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 7199202538712889505 + second: override_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: override_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 1a87212e094b8e360800000000000000 + internalID: 7199202538712889505 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/parameters_16.png.meta b/Editor/Code/Resources/parameters_16.png.meta index bd5e2c6d..106745ea 100644 --- a/Editor/Code/Resources/parameters_16.png.meta +++ b/Editor/Code/Resources/parameters_16.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 65582e8c2e7ec44408c35953a15e0313 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 1038617144704090744 + second: parameters_16_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: parameters_16_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 872c7bf4ac8e96e00800000000000000 + internalID: 1038617144704090744 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/processor_directiv_32.png.meta b/Editor/Code/Resources/processor_directiv_32.png.meta index 297b6978..aa708970 100644 --- a/Editor/Code/Resources/processor_directiv_32.png.meta +++ b/Editor/Code/Resources/processor_directiv_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 6583501ae5a9d3d40a4550de97747803 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -5450258548678501539 + second: processor_directiv_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: processor_directiv_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: d5b5bf70abacc54b0800000000000000 + internalID: -5450258548678501539 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/property_16.png.meta b/Editor/Code/Resources/property_16.png.meta index ac5a943e..6ea65a0d 100644 --- a/Editor/Code/Resources/property_16.png.meta +++ b/Editor/Code/Resources/property_16.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 6104b93d330962d468964058e77a0c75 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 7281534350393190472 + second: property_16_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: property_16_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 848adf699e43d0560800000000000000 + internalID: 7281534350393190472 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/property_32.png.meta b/Editor/Code/Resources/property_32.png.meta index d1605239..65908a75 100644 --- a/Editor/Code/Resources/property_32.png.meta +++ b/Editor/Code/Resources/property_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 2ec21077c38a5ad4b92276cf488d82d6 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -4757325441937551645 + second: property_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: property_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 3ee426847b59afdb0800000000000000 + internalID: -4757325441937551645 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/return_32.png.meta b/Editor/Code/Resources/return_32.png.meta index 6634b0d2..ec3bc150 100644 --- a/Editor/Code/Resources/return_32.png.meta +++ b/Editor/Code/Resources/return_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 4caec0881d844ec4297f7a5cebb6c9a9 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -5105985045981200661 + second: return_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: return_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: bee75d147a5e329b0800000000000000 + internalID: -5105985045981200661 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/return_event_32.png.meta b/Editor/Code/Resources/return_event_32.png.meta index 83627a5a..3f978176 100644 --- a/Editor/Code/Resources/return_event_32.png.meta +++ b/Editor/Code/Resources/return_event_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 7144e68c03aaa02418796fa667a81cdf TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -5359066103771397743 + second: return_event_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: return_event_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 1918edca5c5c0a5b0800000000000000 + internalID: -5359066103771397743 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/scope_32.png.meta b/Editor/Code/Resources/scope_32.png.meta index 877197ad..ef8da163 100644 --- a/Editor/Code/Resources/scope_32.png.meta +++ b/Editor/Code/Resources/scope_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: d24b1a8dd533c184fa9215ded750abe9 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -6546716132187997596 + second: scope_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: scope_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 46a7d9f1d546525a0800000000000000 + internalID: -6546716132187997596 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/search_16.png.meta b/Editor/Code/Resources/search_16.png.meta index c5fd8d2e..c97371a6 100644 --- a/Editor/Code/Resources/search_16.png.meta +++ b/Editor/Code/Resources/search_16.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: b259c174df5052349b85574e0408475e TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 8026130318790402131 + second: search_16_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: search_16_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 350ae7c200b826f60800000000000000 + internalID: 8026130318790402131 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/setter_32.png.meta b/Editor/Code/Resources/setter_32.png.meta index 972a0eb6..ab5b7725 100644 --- a/Editor/Code/Resources/setter_32.png.meta +++ b/Editor/Code/Resources/setter_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 79d7d5c730b6a6f478422461cd4ee297 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 367228414500777997 + second: setter_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: setter_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: d00bfbd1c48a81500800000000000000 + internalID: 367228414500777997 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/settings_16.png.meta b/Editor/Code/Resources/settings_16.png.meta index 46a771b8..7660b1f9 100644 --- a/Editor/Code/Resources/settings_16.png.meta +++ b/Editor/Code/Resources/settings_16.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: eb8a65860caf4a345a893c87e6e374d6 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -8636448100172555334 + second: settings_16_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: settings_16_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: abb1e14f53c252880800000000000000 + internalID: -8636448100172555334 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/special_16.png.meta b/Editor/Code/Resources/special_16.png.meta index c2079bbc..a4d38841 100644 --- a/Editor/Code/Resources/special_16.png.meta +++ b/Editor/Code/Resources/special_16.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: f4f12ea5d5ab4f241ae3f6d3090c4195 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 289408947559574598 + second: special_16_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: special_16_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 64cab1a87ef240400800000000000000 + internalID: 289408947559574598 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/special_32.png.meta b/Editor/Code/Resources/special_32.png.meta index f9ae858a..2961bb49 100644 --- a/Editor/Code/Resources/special_32.png.meta +++ b/Editor/Code/Resources/special_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 7ac2c54beb0be724d8931e9ef1e44a9f TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 5368657271316963625 + second: special_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: special_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 9216aa9085d418a40800000000000000 + internalID: 5368657271316963625 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/struct_16.png.meta b/Editor/Code/Resources/struct_16.png.meta index e2859f0c..fba086f9 100644 --- a/Editor/Code/Resources/struct_16.png.meta +++ b/Editor/Code/Resources/struct_16.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 53f108032e0452c43ab28994e3327f73 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -8733804332081731744 + second: struct_16_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: struct_16_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 0672080db3b4bc680800000000000000 + internalID: -8733804332081731744 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/struct_32.png.meta b/Editor/Code/Resources/struct_32.png.meta index 28a84745..2c8106a5 100644 --- a/Editor/Code/Resources/struct_32.png.meta +++ b/Editor/Code/Resources/struct_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 2a08cdec3b7e6624eba19e89870c7b81 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -2215051505936915184 + second: struct_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: struct_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 015af65246e8241e0800000000000000 + internalID: -2215051505936915184 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/this_32.png.meta b/Editor/Code/Resources/this_32.png.meta index 0bd4e5af..9a5f5609 100644 --- a/Editor/Code/Resources/this_32.png.meta +++ b/Editor/Code/Resources/this_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 4f05b31edbae2e6429a2629bf1f3470c TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -2545678536355756488 + second: this_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: this_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 836cd28dbdeebacd0800000000000000 + internalID: -2545678536355756488 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/value_reroute_32.png.meta b/Editor/Code/Resources/value_reroute_32.png.meta index afbb91cd..e5c4d32c 100644 --- a/Editor/Code/Resources/value_reroute_32.png.meta +++ b/Editor/Code/Resources/value_reroute_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 0f2312eb9f6aecb4e85b6944732e079e TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 2269922962888023226 + second: value_reroute_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: value_reroute_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: abc517e78e2608f10800000000000000 + internalID: 2269922962888023226 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/variables_16.png.meta b/Editor/Code/Resources/variables_16.png.meta index 0fbcb462..8acea5ce 100644 --- a/Editor/Code/Resources/variables_16.png.meta +++ b/Editor/Code/Resources/variables_16.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 74e323c3a9752134d97aff1d6ac23a7b TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 6656259282790846734 + second: variables_16_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: variables_16_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e0115a32d88cf5c50800000000000000 + internalID: 6656259282790846734 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/variables_32.png.meta b/Editor/Code/Resources/variables_32.png.meta index b47fe0a4..a99c059d 100644 --- a/Editor/Code/Resources/variables_32.png.meta +++ b/Editor/Code/Resources/variables_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: af3d67be75152844d9844b5d36fa8bf2 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 7787394597205538194 + second: variables_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: variables_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 2957b347022621c60800000000000000 + internalID: 7787394597205538194 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/void_32.png.meta b/Editor/Code/Resources/void_32.png.meta index 97e86c1c..1e0dce44 100644 --- a/Editor/Code/Resources/void_32.png.meta +++ b/Editor/Code/Resources/void_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: d0f060cf261f19348a0173d8557abfba TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 5964369887719219110 + second: void_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: void_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 6af5a82ffc2b5c250800000000000000 + internalID: 5964369887719219110 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Resources/warning_32.png.meta b/Editor/Code/Resources/warning_32.png.meta index 770cb66d..5d2181e8 100644 --- a/Editor/Code/Resources/warning_32.png.meta +++ b/Editor/Code/Resources/warning_32.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 9217f53738d1fa049a4f46d583a567d2 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -4963630885801615908 + second: warning_32_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: warning_32_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: cdd13aff104ad1bb0800000000000000 + internalID: -4963630885801615908 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Code/Widgets/Delegates/BindDelegateNodeWidget.cs b/Editor/Code/Widgets/Delegates/BindDelegateNodeWidget.cs index 1572df12..c22f060b 100644 --- a/Editor/Code/Widgets/Delegates/BindDelegateNodeWidget.cs +++ b/Editor/Code/Widgets/Delegates/BindDelegateNodeWidget.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System; using System.Reflection; +using UnityEngine.Assemblies; +using System.Linq; namespace Unity.VisualScripting.Community { @@ -37,7 +39,11 @@ protected override void DrawHeaderAddon() GenericMenu menu = new GenericMenu(); List result = new List(); +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif for (int assembly = 0; assembly < assemblies.Length; assembly++) { diff --git a/Editor/Code/Widgets/Delegates/DelegateInvokeNodeWidget.cs b/Editor/Code/Widgets/Delegates/DelegateInvokeNodeWidget.cs index a88afb0c..fa42ea86 100644 --- a/Editor/Code/Widgets/Delegates/DelegateInvokeNodeWidget.cs +++ b/Editor/Code/Widgets/Delegates/DelegateInvokeNodeWidget.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System; using System.Reflection; +using UnityEngine.Assemblies; +using System.Linq; namespace Unity.VisualScripting.Community { @@ -36,7 +38,11 @@ protected override void DrawHeaderAddon() GenericMenu menu = new GenericMenu(); List result = new List(); +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif for (int assembly = 0; assembly < assemblies.Length; assembly++) { diff --git a/Editor/Code/Widgets/Delegates/DelegateNodeWidget.cs b/Editor/Code/Widgets/Delegates/DelegateNodeWidget.cs index 1a682b59..1a48a10a 100644 --- a/Editor/Code/Widgets/Delegates/DelegateNodeWidget.cs +++ b/Editor/Code/Widgets/Delegates/DelegateNodeWidget.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System; using System.Reflection; +using UnityEngine.Assemblies; +using System.Linq; namespace Unity.VisualScripting.Community { @@ -35,7 +37,11 @@ protected override void DrawHeaderAddon() GenericMenu menu = new GenericMenu(); List result = new List(); +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif for (int assembly = 0; assembly < assemblies.Length; assembly++) { diff --git a/Editor/Code/Widgets/Delegates/UnbindDelegateNodeWidget.cs b/Editor/Code/Widgets/Delegates/UnbindDelegateNodeWidget.cs index 44b12aac..26de2f23 100644 --- a/Editor/Code/Widgets/Delegates/UnbindDelegateNodeWidget.cs +++ b/Editor/Code/Widgets/Delegates/UnbindDelegateNodeWidget.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System; using System.Reflection; +using UnityEngine.Assemblies; +using System.Linq; namespace Unity.VisualScripting.Community { @@ -36,7 +38,11 @@ protected override void DrawHeaderAddon() GenericMenu menu = new GenericMenu(); List result = new List(); +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif for (int assembly = 0; assembly < assemblies.Length; assembly++) { diff --git a/Editor/Internal/AOTMethodsPrebuilder.cs b/Editor/Internal/AOTMethodsPrebuilder.cs index 683e6df7..47b7c8a6 100644 --- a/Editor/Internal/AOTMethodsPrebuilder.cs +++ b/Editor/Internal/AOTMethodsPrebuilder.cs @@ -11,6 +11,8 @@ using Unity.VisualScripting.Community.Libraries.CSharp; using ParameterModifier = Unity.VisualScripting.Community.Libraries.CSharp.ParameterModifier; using Unity.VisualScripting.Community.CSharp; +using UnityEngine.Assemblies; +using System.Reflection; namespace Unity.VisualScripting.Community { @@ -114,7 +116,13 @@ private List GetTypesForAOTMethods() { List types = new List(); - var allTypes = AppDomain.CurrentDomain.GetAssemblies().SelectMany(assembly => assembly.GetTypes().Where(type => typeof(UnityEventBase).IsAssignableFrom(type))).ToList(); +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else + Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif + + var allTypes = assemblies.SelectMany(assembly => assembly.GetTypes().Where(type => typeof(UnityEventBase).IsAssignableFrom(type))).ToList(); int count = allTypes.Count; for (int i = 0; i < count; i++) diff --git a/Editor/Internal/Patches/GraphGUI/GraphGUIFloatingToolbar.cs b/Editor/Internal/Patches/GraphGUI/GraphGUIFloatingToolbar.cs index d62b2c16..e03834b7 100644 --- a/Editor/Internal/Patches/GraphGUI/GraphGUIFloatingToolbar.cs +++ b/Editor/Internal/Patches/GraphGUI/GraphGUIFloatingToolbar.cs @@ -10,133 +10,104 @@ namespace Unity.VisualScripting.Community { internal static class GraphGUIFloatingToolbar { - public const float FloatingToolbarButtonSize = 28; + private static readonly Color BackgroundColor = EditorGUIUtility.isProSkin ? new Color32(56, 56, 56, 255) : new Color32(194, 194, 194, 255); + private static readonly Color HoverColor = EditorGUIUtility.isProSkin ? new Color32(76, 76, 76, 255) : new Color32(214, 214, 214, 255); + private static readonly Color ActiveColor = EditorGUIUtility.isProSkin ? new Color32(88, 88, 88, 255) : new Color32(150, 150, 150, 255); + private static readonly Color ActiveHoverColor = EditorGUIUtility.isProSkin ? new Color32(108, 108, 108, 255) : new Color32(130, 130, 130, 255); + private static readonly Color BorderColor = EditorGUIUtility.isProSkin ? new Color32(26, 26, 26, 255) : new Color32(164, 164, 164, 255); private static bool previousDeveloperMode = BoltCore.Configuration.developerMode; + private enum ButtonPosition + { + Left, + Middle, + Right, + All + } + public static void Build(VisualElement root, GraphWindow window) { var state = GraphGUIState.Get(window); + if (state.FloatingToolbar != null) return; - if (state.FloatingToolbar != null) - return; - - var toolbar = CreateFloatingToolbar(window); + var toolbar = CreateToolbarContainer(window); state.FloatingToolbar = toolbar; - toolbar.style.flexDirection = FlexDirection.Row; - toolbar.style.alignItems = Align.FlexEnd; - toolbar.style.justifyContent = Justify.SpaceBetween; - toolbar.style.flexShrink = 0; - void RebuildToolbar() { toolbar.Clear(); var reference = window.reference; if (reference == null || !reference.isValid) return; + var canvas = reference.Context().canvas; - toolbar.style.width = GraphGUIUtilities.GetCanvasToolbarWidth(canvas); - ToolbarButton errorButton = null; - errorButton = CreateFloatingButton(EditorGUIUtility.IconContent("console.erroricon").image, "Clear Errors", () => - { - var reference = window.reference; - foreach (var ed in reference.debugData.elementsData.Where(e => e.runtimeException != null)) - { - ed.runtimeException = null; - } - }, () => - { - // A bit hacky but using this so I do not need to add another IMGUI container just to detect the developer mode change - if (previousDeveloperMode != BoltCore.Configuration.developerMode) - { - previousDeveloperMode = BoltCore.Configuration.developerMode; - errorButton.schedule.Execute(() => RebuildToolbar()); - return; - } - - var reference = window.reference; - var erroredElementsDebugData = ListPool.New(); - - foreach (var elementDebugData in reference?.debugData?.elementsData ?? Enumerable.Empty()) - { - if (elementDebugData.runtimeException != null) - { - erroredElementsDebugData.Add(elementDebugData); - } - } - - if (erroredElementsDebugData.Count > 0) - { - errorButton.style.opacity = 1; - errorButton.SetEnabled(true); - } - else - { - errorButton.style.opacity = 0; - errorButton.SetEnabled(false); - } - - erroredElementsDebugData.Free(); - }); - toolbar.Add(errorButton); + toolbar.style.width = StyleKeyword.Auto; + + var errorSection = CreateSection("ErrorSection"); + errorSection.Add(CreateErrorButton(window)); + toolbar.Add(errorSection); if (canvas is FlowCanvas flowCanvas) { - var relationsButton = CreateToggleButton(EditorGUIUtility.IconContent("UnityEditor.Graphs.AnimatorControllerTool").image, "Port Relations", flowCanvas.showRelations, v => flowCanvas.showRelations = v); - var valuesButton = CreateToggleButton(EditorGUIUtility.IconContent("UnityEditor.InspectorWindow").image, "Flow Values", BoltFlow.Configuration.showConnectionValues, v => { BoltFlow.Configuration.showConnectionValues = v; BoltFlow.Configuration.Save(); }); - var dimButton = CreateToggleButton(EditorGUIUtility.IconContent("animationvisibilitytoggleoff").image, "Dim Nodes", BoltCore.Configuration.dimInactiveNodes, v => { BoltCore.Configuration.dimInactiveNodes = v; BoltCore.Configuration.Save(); }); - var carryButton = CreateToggleButton(BoltCore.Icons.window?[IconSize.Small], "Carry Children", BoltCore.Configuration.carryChildren, v => { BoltCore.Configuration.carryChildren = v; BoltCore.Configuration.Save(); }); - - toolbar.Add(relationsButton); - toolbar.Add(valuesButton); - toolbar.Add(dimButton); - toolbar.Add(carryButton); + var flowSection = CreateSection("CanvasSection"); + flowSection.Add(CreateToggle(EditorGUIUtility.IconContent("UnityEditor.Graphs.AnimatorControllerTool").image, "Port Relations", flowCanvas.showRelations, v => flowCanvas.showRelations = v, ButtonPosition.Left)); + flowSection.Add(CreateToggle(EditorGUIUtility.IconContent("UnityEditor.InspectorWindow").image, "Flow Values", BoltFlow.Configuration.showConnectionValues, v => { BoltFlow.Configuration.showConnectionValues = v; BoltFlow.Configuration.Save(); }, ButtonPosition.Middle)); + flowSection.Add(CreateDimNodesToggle(ButtonPosition.Middle)); + flowSection.Add(CreateToggle(BoltCore.Icons.window?[IconSize.Small], "Carry Children", BoltCore.Configuration.carryChildren, v => { BoltCore.Configuration.carryChildren = v; BoltCore.Configuration.Save(); }, ButtonPosition.Right)); + toolbar.Add(flowSection); } - else if (canvas is StateCanvas stateCanvas) + else if (canvas is StateCanvas) { - var dimButton = CreateToggleButton(EditorGUIUtility.IconContent("animationvisibilitytoggleoff").image, "Dim States", BoltCore.Configuration.dimInactiveNodes, v => { BoltCore.Configuration.dimInactiveNodes = v; BoltFlow.Configuration.Save(); }); - toolbar.Add(dimButton); + var stateSection = CreateSection("CanvasSection"); + stateSection.Add(CreateDimNodesToggle(ButtonPosition.All)); + toolbar.Add(stateSection); } - toolbar.Add(CreateEnumButton(PathUtil.Load("Align", CommunityEditorPath.Fundamentals)?[IconSize.Small], "Align", (r) => - { - LudiqGUI.FuzzyDropdown(r, EnumOptionTree.For(), null, op => canvas.Align((AlignOperation)op)); - }, canvas)); + var layoutSection = CreateSection("LayoutSection"); + layoutSection.Add(CreateActionButton(PathUtil.Load("Align", CommunityEditorPath.Fundamentals)?[IconSize.Small], "Align", b => + LudiqGUI.FuzzyDropdown(b.worldBound, EnumOptionTree.For(), null, op => canvas.Align((AlignOperation)op)), + () => canvas.selection.Count > 1, ButtonPosition.Left)); - toolbar.Add(CreateEnumButton(PathUtil.Load("Distribute", CommunityEditorPath.Fundamentals)?[IconSize.Small], "Distribute", (r) => - { - LudiqGUI.FuzzyDropdown(r, EnumOptionTree.For(), null, op => canvas.Distribute((DistributeOperation)op)); - }, canvas)); + layoutSection.Add(CreateActionButton(PathUtil.Load("Distribute", CommunityEditorPath.Fundamentals)?[IconSize.Small], "Distribute", b => + LudiqGUI.FuzzyDropdown(b.worldBound, EnumOptionTree.For(), null, op => canvas.Distribute((DistributeOperation)op)), + () => canvas.selection.Count > 1, ButtonPosition.Right)); + toolbar.Add(layoutSection); - toolbar.Add(CreateOverviewButton(PathUtil.Load("Overview", CommunityEditorPath.Fundamentals)?[IconSize.Small], "Overview", () => - { - GraphUtility.OverrideContextIfNeeded(() => - canvas.ViewElements(reference.graph.elements)); - })); + var windowSection = CreateSection("WindowSection", BoltCore.Configuration.developerMode); + windowSection.Add(CreateActionButton((Texture2D)EditorGUIUtility.IconContent("SearchOverlay").image, "Overview", _ => + GraphUtility.OverrideContextIfNeeded(() => canvas.ViewElements(reference.graph.elements)), null , ButtonPosition.Left)); - toolbar.Add(CreateWindowMaximizeButton(PathUtil.Load("Maximize", CommunityEditorPath.Fundamentals)?[IconSize.Small], "Maximize", window)); + windowSection.Add(CreateStatefulToggle(PathUtil.Load("maximize_window", CommunityEditorPath.Fundamentals)?[IconSize.Small], "Maximize", + () => window.maximized, + v => { window.maximized = v; GUIUtility.ExitGUI(); }, ButtonPosition.Right)); + toolbar.Add(windowSection); if (BoltCore.Configuration.developerMode) { - toolbar.Add(CreateToggleButton(typeof(Debug).Icon()?[IconSize.Small], "Debug", BoltCore.Configuration.debug, v => - { - BoltCore.Configuration.debug = !BoltCore.Configuration.debug; - })); + var debugSection = CreateSection("DebugSection", false); + string iconName = EditorGUIUtility.isProSkin ? "debug On" : "debug"; + debugSection.Add(CreateToggle((Texture2D)EditorGUIUtility.IconContent(iconName).image, "Debug", BoltCore.Configuration.debug, v => BoltCore.Configuration.debug = v, ButtonPosition.All)); + toolbar.Add(debugSection); } } - RebuildToolbar(); - state.contextChanged += () => + toolbar.schedule.Execute(() => { - toolbar.schedule.Execute(() => RebuildToolbar()); - }; + if (previousDeveloperMode != BoltCore.Configuration.developerMode) + { + previousDeveloperMode = BoltCore.Configuration.developerMode; + toolbar.Q("DebugSection").style.display = BoltCore.Configuration.developerMode ? DisplayStyle.Flex : DisplayStyle.None; + toolbar.Q("WindowSection").style.marginRight = BoltCore.Configuration.developerMode ? 12 : 0; + } + }).Every(500); + RebuildToolbar(); + state.contextChanged += () => toolbar.schedule.Execute(RebuildToolbar); root.Add(toolbar); } - static VisualElement CreateFloatingToolbar(GraphWindow window) + static VisualElement CreateToolbarContainer(GraphWindow window) { - var context = window.context; var sidebars = GraphGUIUtilities.GetSidebars(window); const float rightMargin = 10f; return new VisualElement @@ -145,255 +116,166 @@ static VisualElement CreateFloatingToolbar(GraphWindow window) style = { position = Position.Absolute, - top = 30, + flexDirection = FlexDirection.Row, + top = 25, right = sidebars.right.show ? sidebars.right.GetWidth() + rightMargin : rightMargin, - width = GraphGUIUtilities.GetCanvasToolbarWidth(context.canvas), height = 25, backgroundColor = Color.clear, } }; } - public static void KeepAnchored(GraphWindow window) + private static VisualElement CreateSection(string sectionName, bool addSpace = true) { - var state = GraphGUIState.Get(window); - if (state.FloatingToolbar == null) return; - - const float rightMargin = 10f; - - try + var section = new VisualElement { - var sidebars = GraphGUIUtilities.GetSidebars(window); - state.FloatingToolbar.style.right = - sidebars.right.show ? sidebars.right.GetWidth() + rightMargin : rightMargin; - } - catch { } + name = sectionName, + style = { + flexDirection = FlexDirection.Row, + marginRight = addSpace ? 12 : 0, + height = 26 + } + }; + return section; } - - private static ToolbarButton CreateFloatingButton(Texture icon, string tooltip, Action callback, Action imgui) + private static ToolbarButton CreateBaseButton(Texture icon, string tooltip, ButtonPosition position) { - var btn = new ToolbarButton(() => callback()) + var btn = new ToolbarButton { tooltip = tooltip, focusable = false, - style = - { - width = FloatingToolbarButtonSize, - height = FloatingToolbarButtonSize, -#if UNITY_2022_2_OR_NEWER - backgroundSize = new BackgroundSize(Length.Percent(100), Length.Percent(100)) -#else - unityBackgroundScaleMode = ScaleMode.ScaleToFit, -#endif + style = { + width = 34, height = 26, + justifyContent = Justify.Center, alignItems = Align.Center, + backgroundColor = BackgroundColor, + borderLeftColor = BorderColor, borderTopColor = BorderColor, + borderBottomColor = BorderColor, borderRightColor = BorderColor, + borderLeftWidth = 1, borderRightWidth = 1, borderTopWidth = 1, borderBottomWidth = 1, + borderTopLeftRadius = position == ButtonPosition.Left || position == ButtonPosition.All ? 3 : 0, + borderBottomLeftRadius = position == ButtonPosition.Left || position == ButtonPosition.All ? 3 : 0, + borderTopRightRadius = position == ButtonPosition.Right || position == ButtonPosition.All ? 3 : 0, + borderBottomRightRadius = position == ButtonPosition.Right || position == ButtonPosition.All ? 3 : 0, + marginLeft = -1 } }; -#if UNITY_2023_2_OR_NEWER - if (icon != null) - btn.iconImage = icon as Texture2D; -#else if (icon != null) { - var img = new Image(); - img.image = icon; + var img = new Image { image = icon, scaleMode = ScaleMode.ScaleToFit }; + img.style.width = 16; img.style.height = 16; btn.Add(img); } -#endif - btn.Add(new IMGUIContainer(() => - { - btn.style.backgroundImage = LudiqStyles.spinnerButton.normal.background; - imgui(); - })); return btn; } - private static ToolbarButton CreateToggleButton(Texture icon, string tooltip, bool isOn, Action callback) + private static ToolbarButton CreateActionButton(Texture icon, string tooltip, Action onClick, Func enabledCheck = null,ButtonPosition position = ButtonPosition.Middle) { - ToolbarButton btn = null; - btn = new ToolbarButton(() => - { - isOn = !isOn; - callback(isOn); - }) - { - tooltip = tooltip, - focusable = false, - style = - { - width = FloatingToolbarButtonSize, - height = FloatingToolbarButtonSize, -#if UNITY_2022_2_OR_NEWER - backgroundSize = new BackgroundSize(Length.Percent(100), Length.Percent(100)) -#else - unityBackgroundScaleMode = ScaleMode.ScaleToFit, -#endif - } - }; + var btn = CreateBaseButton(icon, tooltip, position); + btn.clicked += () => onClick?.Invoke(btn); -#if UNITY_2023_2_OR_NEWER - if (icon != null) - btn.iconImage = icon as Texture2D; -#else - if (icon != null) + btn.RegisterCallback(e => btn.style.backgroundColor = HoverColor); + btn.RegisterCallback(e => btn.style.backgroundColor = BackgroundColor); + + if (enabledCheck != null) { - var imgContainer = new VisualElement(); - imgContainer.style.flexGrow = 1; - imgContainer.style.flexShrink = 1; - imgContainer.style.justifyContent = Justify.Center; - imgContainer.style.alignItems = Align.Center; - - var img = new Image(); - img.image = icon; - img.scaleMode = ScaleMode.ScaleToFit; - img.style.width = StyleKeyword.Auto; - img.style.height = StyleKeyword.Auto; - - imgContainer.Add(img); - btn.Add(imgContainer); + btn.SetEnabled(enabledCheck()); + btn.schedule.Execute(() => btn.SetEnabled(enabledCheck())).Every(100); } -#endif - var imgui = new IMGUIContainer(() => - { - btn.style.backgroundImage = !isOn ? LudiqStyles.spinnerButton.normal.background : LudiqStyles.spinnerButton.active.background; - }); - - btn.Add(imgui); return btn; } - private static ToolbarButton CreateWindowMaximizeButton(Texture icon, string tooltip, GraphWindow window) + private static ToolbarButton CreateToggle(Texture icon, string tooltip, bool initialState, Action onToggle, ButtonPosition position) { - ToolbarButton btn = null; - btn = new ToolbarButton(() => - { - window.maximized = !window.maximized; - GUIUtility.hotControl = 0; - GUIUtility.keyboardControl = 0; - GUIUtility.ExitGUI(); - }) - { - tooltip = tooltip, - focusable = false, - style = - { - width = FloatingToolbarButtonSize, - height = FloatingToolbarButtonSize, -#if UNITY_2022_2_OR_NEWER - backgroundSize = new BackgroundSize(Length.Percent(100), Length.Percent(100)) -#else - unityBackgroundScaleMode = ScaleMode.ScaleToFit, -#endif - } - }; + bool state = initialState; + var btn = CreateBaseButton(icon, tooltip, position); -#if UNITY_2023_2_OR_NEWER - if (icon != null) - btn.iconImage = icon as Texture2D; -#else - if (icon != null) - { - var img = new Image(); - img.image = icon; - btn.Add(img); - } -#endif + void UpdateStyle() => btn.style.backgroundColor = state ? ActiveColor : BackgroundColor; + UpdateStyle(); - btn.Add(new IMGUIContainer(() => + btn.clicked += () => { - btn.style.backgroundImage = !window.maximized ? LudiqStyles.spinnerButton.normal.background : LudiqStyles.spinnerButton.active.background; - })); + state = !state; + onToggle?.Invoke(state); + btn.style.backgroundColor = state ? ActiveHoverColor : HoverColor; + }; + + btn.RegisterCallback(e => btn.style.backgroundColor = state ? ActiveHoverColor : HoverColor); + btn.RegisterCallback(e => UpdateStyle()); return btn; } - private static ToolbarButton CreateOverviewButton(Texture2D icon, string tooltip, Action callback) + private static ToolbarButton CreateStatefulToggle(Texture icon, string tooltip, Func getter, Action setter, ButtonPosition position) { - var btn = new ToolbarButton(callback) - { - tooltip = tooltip, - focusable = false, - style = - { - width = FloatingToolbarButtonSize, - height = FloatingToolbarButtonSize, -#if UNITY_2022_2_OR_NEWER - backgroundSize = new BackgroundSize(Length.Percent(100), Length.Percent(100)) -#else - unityBackgroundScaleMode = ScaleMode.ScaleToFit, -#endif - } - }; + var btn = CreateBaseButton(icon, tooltip, position); -#if UNITY_2023_2_OR_NEWER - if (icon != null) - btn.iconImage = icon; -#else - if (icon != null) - { - var img = new Image(); - img.image = icon; - btn.Add(img); - } -#endif + void UpdateStyle() => btn.style.backgroundColor = getter() ? ActiveColor : BackgroundColor; + UpdateStyle(); - btn.Add(new IMGUIContainer(() => + btn.clicked += () => { - btn.style.backgroundImage = LudiqStyles.spinnerButton.normal.background; - })); + bool newState = !getter(); + btn.style.backgroundColor = newState ? ActiveColor : BackgroundColor; + setter?.Invoke(newState); + }; + + btn.RegisterCallback(e => btn.style.backgroundColor = getter() ? ActiveHoverColor : HoverColor); + btn.RegisterCallback(e => UpdateStyle()); return btn; } - private static ToolbarButton CreateEnumButton(Texture2D icon, string tooltip, Action callback, ICanvas canvas) + private static ToolbarButton CreateErrorButton(GraphWindow window) { - bool show = false; - var btn = new ToolbarButton(() => + var btn = CreateActionButton(EditorGUIUtility.IconContent("console.erroricon.inactive.sml").image, "Clear Errors", _ => { - show = true; - }) - { - tooltip = tooltip, - focusable = false, - style = - { - width = FloatingToolbarButtonSize, - height = FloatingToolbarButtonSize, -#if UNITY_2022_2_OR_NEWER - backgroundSize = new BackgroundSize(Length.Percent(100), Length.Percent(100)) -#else - unityBackgroundScaleMode = ScaleMode.ScaleToFit, -#endif - } - }; + var reference = window.reference; + foreach (var ed in reference.debugData.elementsData.Where(e => e.runtimeException != null)) + ed.runtimeException = null; + }, null, ButtonPosition.All); - btn.Add(new IMGUIContainer(() => - { - btn.style.backgroundImage = LudiqStyles.spinnerButton.normal.background; - btn.SetEnabled(canvas.selection.Count > 1); + bool hasErrors = window.reference?.debugData?.elementsData.Any(e => e.runtimeException != null) ?? false; - if (show) - { - show = false; - callback?.Invoke(btn.layout); - } - })); + btn.style.opacity = hasErrors ? 1 : 0; + btn.tooltip = hasErrors ? "Clear Errors" : ""; -#if UNITY_2023_2_OR_NEWER - if (icon != null) - btn.iconImage = icon; -#else - if (icon != null) + btn.schedule.Execute(() => { - var img = new Image(); - img.image = icon; - btn.Add(img); - } -#endif + var hasErrors = window.reference?.debugData?.elementsData.Any(e => e.runtimeException != null) ?? false; + btn.style.opacity = hasErrors ? 1 : 0; + btn.tooltip = hasErrors ? "Clear Errors" : ""; + btn.SetEnabled(hasErrors); + }).Every(200); + + return btn; + } + + private static ToolbarButton CreateDimNodesToggle(ButtonPosition position) + { + Texture onIcon = EditorGUIUtility.IconContent("VisibilityOff").image; + Texture offIcon = EditorGUIUtility.IconContent("VisibilityOn").image; + ToolbarButton btn = null; + btn = CreateToggle(BoltCore.Configuration.dimInactiveNodes ? onIcon : offIcon, "Dim Nodes", BoltCore.Configuration.dimInactiveNodes, v => + { + BoltCore.Configuration.dimInactiveNodes = v; + BoltCore.Configuration.Save(); + var img = btn.Q(); + if (img != null) img.image = v ? onIcon : offIcon; + }, position); return btn; } + + public static void KeepAnchored(GraphWindow window) + { + var state = GraphGUIState.Get(window); + if (state.FloatingToolbar == null) return; + const float margin = 10f; + var sidebars = GraphGUIUtilities.GetSidebars(window); + state.FloatingToolbar.style.right = sidebars.right.show ? sidebars.right.GetWidth() + margin : margin; + } } } \ No newline at end of file diff --git a/Editor/Internal/Patches/GraphGUI/GraphGUIPatch.cs b/Editor/Internal/Patches/GraphGUI/GraphGUIPatch.cs index ab151fa6..3339a128 100644 --- a/Editor/Internal/Patches/GraphGUI/GraphGUIPatch.cs +++ b/Editor/Internal/Patches/GraphGUI/GraphGUIPatch.cs @@ -19,8 +19,8 @@ static GraphGUIPatch() static void OnEditorUpdate() { #if NEW_TOOLBAR_STYLE - var tabs = GraphWindow.tabs; - if (tabs == null || tabs.Count() == 0) + var tabs = GraphWindow.tabsNoAlloc; + if (tabs == null || tabs.Count == 0) return; foreach (var window in tabs) diff --git a/Editor/Internal/Patches/GraphGUI/GraphGUIStyles.cs b/Editor/Internal/Patches/GraphGUI/GraphGUIStyles.cs index 367463b0..1d42b5b6 100644 --- a/Editor/Internal/Patches/GraphGUI/GraphGUIStyles.cs +++ b/Editor/Internal/Patches/GraphGUI/GraphGUIStyles.cs @@ -99,10 +99,10 @@ public static void InitializeNewGUI() ApplyNodeStyle(NodeColor.Green, "GreenNode"); ApplyNodeStyle(NodeColor.Gray, "GrayNode"); ApplyNodeStyle(NodeColor.Yellow, "YellowNode"); - ApplyNodeStyle(NodeColor.Orange, "OrangeNode", "OrangeNodeSelected"); + ApplyNodeStyle(NodeColor.Orange, "OrangeNode"); ApplyNodeStyle(NodeColor.Teal, "TealNode"); - ApplyNodeStyle(NodeColor.Blue, "BlueNode"); - ApplyNodeStyle(NodeColor.Red, "RedNode", "RedNodeSelected"); + ApplyNodeStyle(NodeColor.Blue, "BlueNode", "SelectedBlueNode"); + ApplyNodeStyle(NodeColor.Red, "RedNode"); var stateBackground = VisualScripting.StateWidget.Styles.contentBackground; @@ -156,19 +156,23 @@ private static void ApplyNodeStyle(NodeColor color, string normal, string select { var style = GraphGUI.GetNodeStyle(NodeShape.Square, color); + var normalTexture = PathUtil.Load(normal, CommunityEditorPath.Fundamentals)?[IconSize.Large]; + var selectedTexture = PathUtil.Load(selected, CommunityEditorPath.Fundamentals)?[IconSize.Large]; + style.normal.background = - PathUtil.Load(normal, CommunityEditorPath.Fundamentals)?[IconSize.Large]; + normalTexture; style.active.background = - PathUtil.Load(selected, CommunityEditorPath.Fundamentals)?[IconSize.Large]; + selectedTexture; style.focused.background = - PathUtil.Load(selected, CommunityEditorPath.Fundamentals)?[IconSize.Large]; + selectedTexture; style.hover.background = - PathUtil.Load(selected, CommunityEditorPath.Fundamentals)?[IconSize.Large]; + selectedTexture; - style.padding = new RectOffset(5, 5, 5, 5); + style.border = new RectOffset(12, 12, 12, 12); + style.padding = new RectOffset(8, 8, 8, 8); } } } \ No newline at end of file diff --git a/Editor/Internal/Patches/GraphGUI/GraphGUIToolbar.cs b/Editor/Internal/Patches/GraphGUI/GraphGUIToolbar.cs index 35d56cfa..f9421fad 100644 --- a/Editor/Internal/Patches/GraphGUI/GraphGUIToolbar.cs +++ b/Editor/Internal/Patches/GraphGUI/GraphGUIToolbar.cs @@ -9,6 +9,11 @@ namespace Unity.VisualScripting.Community { internal static class GraphGUIToolbar { + private static readonly Color BackgroundColor = EditorGUIUtility.isProSkin ? new Color32(56, 56, 56, 255) : new Color32(194, 194, 194, 255); + private static readonly Color HoverColor = EditorGUIUtility.isProSkin ? new Color32(76, 76, 76, 255) : new Color32(214, 214, 214, 255); + private static readonly Color ActiveColor = EditorGUIUtility.isProSkin ? new Color32(88, 88, 88, 255) : new Color32(150, 150, 150, 255); + private static readonly Color ActiveHoverColor = EditorGUIUtility.isProSkin ? new Color32(108, 108, 108, 255) : new Color32(130, 130, 130, 255); + public static void Build(VisualElement root, GraphWindow window) { var state = GraphGUIState.Get(window); @@ -117,11 +122,7 @@ static void ToolbarGUI(VisualElement root, GraphWindow window, VisualElement too Texture2D lockedIconTex = null; ToolbarButton lockedButton = null; - lockedButton = CreateToggleButton("", 30, 20, () => !window.locked ? disabledColor : ColorPalette.unityBackgroundMid, () => - { - window.locked = !window.locked; - lockedButton.style.backgroundColor = !window.locked ? disabledColor : ColorPalette.unityBackgroundMid; - }); + lockedButton = CreateToggleButton("", 30, 20, () => window.locked, (val) => window.locked = val); IMGUIContainer initializer = null; initializer = new IMGUIContainer(() => { @@ -130,7 +131,7 @@ static void ToolbarGUI(VisualElement root, GraphWindow window, VisualElement too GraphGUIStyles.InitializeNewGUI(); if (lockedIconTex != null) return; - + try { lockedIconTex = GraphGUI.Styles.lockIcon.image as Texture2D; @@ -145,20 +146,20 @@ static void ToolbarGUI(VisualElement root, GraphWindow window, VisualElement too }); ToolbarButton inspectorButton = null; - inspectorButton = CreateToggleButton("", 30, 20, () => !window.graphInspectorEnabled ? disabledColor : ColorPalette.unityBackgroundMid, () => - { - window.graphInspectorEnabled = !window.graphInspectorEnabled; - inspectorButton.style.backgroundColor = !window.graphInspectorEnabled ? disabledColor : ColorPalette.unityBackgroundMid; - window.MatchSelection(); - }, BoltCore.Icons.inspectorWindow?[IconSize.Small]); + inspectorButton = CreateToggleButton("", 30, 20, () => window.graphInspectorEnabled, + (val) => + { + window.graphInspectorEnabled = val; + window.MatchSelection(); + }, BoltCore.Icons.inspectorWindow?[IconSize.Small]); ToolbarButton variablesButton = null; - variablesButton = CreateToggleButton("", 40, 20, () => !window.variablesInspectorEnabled ? disabledColor : ColorPalette.unityBackgroundMid, () => - { - window.variablesInspectorEnabled = !window.variablesInspectorEnabled; - variablesButton.style.backgroundColor = !window.variablesInspectorEnabled ? disabledColor : ColorPalette.unityBackgroundMid; - window.MatchSelection(); - }, BoltCore.Icons.variablesWindow?[IconSize.Small]); + variablesButton = CreateToggleButton("", 40, 20, () => window.variablesInspectorEnabled, + (val) => + { + window.variablesInspectorEnabled = val; + window.MatchSelection(); + }, BoltCore.Icons.variablesWindow?[IconSize.Small]); toolbar.Add(lockedButton); toolbar.Add(inspectorButton); @@ -174,9 +175,9 @@ static void ToolbarGUI(VisualElement root, GraphWindow window, VisualElement too toolbar.Add(GraphGUIUtilities.CreateZoomContainer(window)); } - private static ToolbarButton CreateToggleButton(string text, float width, float height, Func backgroundColor, Action callback, Texture2D icon = null) + private static ToolbarButton CreateToggleButton(string text, float width, float height, Func getter, Action setter, Texture2D icon = null) { - var btn = new ToolbarButton(callback) + var btn = new ToolbarButton() { text = text, focusable = false, @@ -184,7 +185,7 @@ private static ToolbarButton CreateToggleButton(string text, float width, float { width = width, height = height, - backgroundColor = backgroundColor(), + backgroundColor = getter() ? ActiveColor : BackgroundColor, #if UNITY_2022_2_OR_NEWER backgroundSize = new BackgroundSize(16f, 16f) #else @@ -193,29 +194,35 @@ private static ToolbarButton CreateToggleButton(string text, float width, float } }; -#if UNITY_2022_2_OR_NEWER - if (icon != null) btn.style.backgroundImage = icon; -#else - if (icon != null) + void UpdateColor(bool isHovering) { - var imgContainer = new VisualElement(); - imgContainer.style.flexGrow = 1; - imgContainer.style.flexShrink = 1; - imgContainer.style.justifyContent = Justify.Center; - imgContainer.style.alignItems = Align.Center; - - var img = new Image(); - img.image = icon; - img.scaleMode = ScaleMode.ScaleToFit; - img.style.width = 16f; - img.style.height = 16f; - - imgContainer.Add(img); - btn.Add(imgContainer); + bool isActive = getter(); + if (isHovering) + btn.style.backgroundColor = isActive ? ActiveHoverColor : HoverColor; + else + btn.style.backgroundColor = isActive ? ActiveColor : BackgroundColor; } + + btn.clicked += () => + { + setter(!getter()); + UpdateColor(true); + }; + + btn.RegisterCallback(evt => UpdateColor(true)); + btn.RegisterCallback(evt => UpdateColor(false)); + + if (icon != null) + { +#if UNITY_2022_2_OR_NEWER + btn.style.backgroundImage = icon; +#else + var img = new Image { image = icon, scaleMode = ScaleMode.ScaleToFit }; + img.style.width = 16f; img.style.height = 16f; + btn.Add(img); #endif - btn.RegisterCallback(evt => btn.style.backgroundColor = new Color(0.3f, 0.3f, 0.3f, 0.5f)); - btn.RegisterCallback(evt => btn.style.backgroundColor = backgroundColor()); + } + return btn; } diff --git a/Editor/Internal/Patches/GraphGUI/GraphGUIUtilities.cs b/Editor/Internal/Patches/GraphGUI/GraphGUIUtilities.cs index 201fcede..2e826790 100644 --- a/Editor/Internal/Patches/GraphGUI/GraphGUIUtilities.cs +++ b/Editor/Internal/Patches/GraphGUI/GraphGUIUtilities.cs @@ -22,22 +22,22 @@ public static VisualElement CreateZoomContainer(GraphWindow window) var container = new VisualElement { style = - { - flexDirection = FlexDirection.Row, - alignItems = Align.Center, - justifyContent = Justify.FlexEnd, - flexGrow = 1 - } + { + flexDirection = FlexDirection.Row, + alignItems = Align.Center, + justifyContent = Justify.FlexEnd, + flexGrow = 1 + } }; var zoomLabel = new Label("Zoom") { style = - { - unityTextAlign = TextAnchor.MiddleLeft, - marginRight = 2, - fontSize = 11 - } + { + unityTextAlign = TextAnchor.MiddleLeft, + marginRight = 2, + fontSize = 11 + } }; container.Add(zoomLabel); @@ -50,13 +50,13 @@ public static VisualElement CreateZoomContainer(GraphWindow window) }; container.Add(zoomSlider); - var zoomValue = new Label($"{window.context.graph.zoom:0.#}x") + var zoomValue = new Label($"{window.context.graph.zoom:0.0}x") { style = { unityTextAlign = TextAnchor.MiddleLeft, marginLeft = 2, - fontSize = 11 + fontSize = 11, } }; @@ -65,18 +65,19 @@ public static VisualElement CreateZoomContainer(GraphWindow window) container.Add(new IMGUIContainer(() => { if (window.context == null) return; - zoomValue.text = $"{window.context.graph.zoom:0.#}x"; + zoomValue.text = $"{window.context.graph.zoom:0.0}x"; zoomSlider.value = window.context.graph.zoom; })); zoomSlider.RegisterValueChangedCallback(ev => { window.context.graph.zoom = ev.newValue; - zoomValue.text = $"{ev.newValue:0.#}x"; + zoomValue.text = $"{ev.newValue:0.0}x"; }); return container; } + public const float FloatingToolbarButtonSize = 28; public static float GetCanvasToolbarWidth(ICanvas canvas) { @@ -85,16 +86,18 @@ public static float GetCanvasToolbarWidth(ICanvas canvas) { size = 1; } + if (canvas is FlowCanvas) { size += 8; - return (FloatingToolbarButtonSize * size) + 10; + return (FloatingToolbarButtonSize * size) + (30 * 4); } else if (canvas is StateCanvas) { size += 6; - return (FloatingToolbarButtonSize * size) + 10; + return (FloatingToolbarButtonSize * size) + (30 * 4); } + return 0; } } diff --git a/Editor/Internal/Patches/GraphMinimap/GraphMiniMapManager.cs b/Editor/Internal/Patches/GraphMinimap/GraphMiniMapManager.cs index 70be0765..32d0e4f2 100644 --- a/Editor/Internal/Patches/GraphMinimap/GraphMiniMapManager.cs +++ b/Editor/Internal/Patches/GraphMinimap/GraphMiniMapManager.cs @@ -2,75 +2,94 @@ using System.Linq; using UnityEditor; -namespace Unity.VisualScripting.Community +namespace Unity.VisualScripting.Community { [InitializeAfterPlugins] public static class GraphMinimapManager { - #if ENABLE_GRAPH_MINIMAP private static readonly Dictionary instances = new Dictionary(); - + + private static double lastUpdateTime; + private const double UpdateInterval = 1.0 / 30.0; static GraphMinimapManager() { - GraphMiniMapStorage.Load(); EditorApplication.update += Update; } - + private static void Update() { + double currentTime = EditorApplication.timeSinceStartup; + if (currentTime - lastUpdateTime < UpdateInterval) + return; + + lastUpdateTime = currentTime; + if (!ProviderPatcher.isWidgetsPatched) return; - + if (GraphGUIUtilities.DisableUI) { DisposeAll(); return; } - - var tabs = GraphWindow.tabs; - if (tabs == null) + + var tabs = GraphWindow.tabsNoAlloc; + if (tabs == null || tabs.Count == 0) return; - + foreach (var window in tabs) { if (window == null) continue; - + if (!instances.TryGetValue(window, out var instance)) { if (window.context == null) continue; - + instance = new GraphMinimapInstance(window); instances.Add(window, instance); } - + instance.Tick(); } - + CleanupClosedWindows(); - GraphMiniMapStorage.SaveIfNeeded(); } - + private static void CleanupClosedWindows() { - var closed = instances.Keys.Where(w => w == null).ToList(); - foreach (var window in closed) + List closed = null; + + foreach (var key in instances.Keys) + { + if (key == null) + { + closed ??= new List(); + closed.Add(key); + } + } + + if (closed != null) { - instances[window].Dispose(); - instances.Remove(window); + for (int i = 0; i < closed.Count; i++) + { + var window = closed[i]; + instances[window]?.Dispose(); + instances.Remove(window); + } } } - + private static void DisposeAll() { foreach (var instance in instances.Values) instance.Dispose(); - + instances.Clear(); } #endif - } + } } \ No newline at end of file diff --git a/Editor/Internal/Patches/GraphMinimap/GraphMinimapElement.cs b/Editor/Internal/Patches/GraphMinimap/GraphMinimapElement.cs new file mode 100644 index 00000000..560e91d1 --- /dev/null +++ b/Editor/Internal/Patches/GraphMinimap/GraphMinimapElement.cs @@ -0,0 +1,248 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; +using UnityEngine.UIElements; + +namespace Unity.VisualScripting.Community +{ + public class GraphMinimapElement : Foldout + { + public const float DefaultX = 200f; + public const float DefaultY = 150f; + private IGraphContext _context; + private List _widgets = new List(); + private IGraphElementWidget _selectedWidget; + + private const float Padding = 50f; + private Rect _combinedBounds; + private float _scale; + private Vector2 _minimapOffset; + + private Vector2 canvasPan; + private Rect canvasViewport; + + public GraphMinimapElement() + { + style.backgroundColor = new Color(0.15f, 0.15f, 0.15f, 0.8f); + style.borderLeftColor = style.borderRightColor = style.borderTopColor = style.borderBottomColor = new Color(0.1f, 0.1f, 0.1f, 0.5f); + style.borderLeftWidth = style.borderRightWidth = style.borderTopWidth = style.borderBottomWidth = 1f; + + var defaultToggle = this.Q(className: Foldout.toggleUssClassName); + if (defaultToggle != null) + { + defaultToggle.style.display = DisplayStyle.None; + } + + RegisterCallback(OnPointerDown); + + generateVisualContent += OnGenerateVisualContent; + // Use the foldout's ability to persist it's Foldout State for the Minimized State + viewDataKey = "VisualScripting-Minimap-Expanded"; + Add(new IMGUIContainer(CanvasSnapshotCapture)); + } + + private void CanvasSnapshotCapture() + { + if (_context == null) return; + + var canvas = _context.canvas; + if (canvas == null) return; + + canvasPan = canvas.pan; + canvasViewport = canvas.viewport; + } + + public void UpdateMinimap(IGraphContext context, List widgets) + { + _context = context; + + _widgets.Clear(); + if (widgets != null) _widgets.AddRange(widgets); + + MarkDirtyRepaint(); + } + + private void OnGenerateVisualContent(MeshGenerationContext mgc) + { + if (_context?.graph == null || _widgets.Count == 0) return; + + var canvas = _context.canvas; + if (canvas == null) return; + + Rect localRect = contentRect; + if (localRect.width <= 1 || localRect.height <= 1) return; + + Rect contentBounds = GraphGUI.CalculateArea(_widgets); + contentBounds.xMin -= Padding; + contentBounds.yMin -= Padding; + contentBounds.xMax += Padding; + contentBounds.yMax += Padding; + + Rect viewportWorld = new Rect(canvasPan - canvasViewport.size * 0.5f, canvasViewport.size); + _combinedBounds = contentBounds.Encompass(viewportWorld); + + float scaleX = localRect.width / _combinedBounds.width; + float scaleY = localRect.height / _combinedBounds.height; + _scale = Mathf.Min(scaleX, scaleY); + + if (_scale <= 0f || float.IsInfinity(_scale)) return; + + _minimapOffset = localRect.center - _combinedBounds.size * (_scale * 0.5f); + + var painter = mgc.painter2D; + + bool contextIsValid = GraphContextProvider.instance.IsValid(_context.reference); + + foreach (var widget in _widgets) + { + if (widget == null || !canvas.widgetProvider.IsValid(widget.item) || !contextIsValid) continue; + + Rect drawRect = ToMinimapRect(widget.position); + + painter.fillColor = GetElementColor(widget).WithAlpha(0.2f); + painter.BeginPath(); + painter.MoveTo(new Vector2(drawRect.xMin, drawRect.yMin)); + painter.LineTo(new Vector2(drawRect.xMax, drawRect.yMin)); + painter.LineTo(new Vector2(drawRect.xMax, drawRect.yMax)); + painter.LineTo(new Vector2(drawRect.xMin, drawRect.yMax)); + painter.ClosePath(); + painter.Fill(); + + if (canvas.selection.Contains(widget.element)) + { + painter.strokeColor = Color.white; + painter.lineWidth = 1f; + painter.BeginPath(); + painter.MoveTo(new Vector2(drawRect.xMin, drawRect.yMin)); + painter.LineTo(new Vector2(drawRect.xMax, drawRect.yMin)); + painter.LineTo(new Vector2(drawRect.xMax, drawRect.yMax)); + painter.LineTo(new Vector2(drawRect.xMin, drawRect.yMax)); + painter.ClosePath(); + painter.Stroke(); + } + } + + Rect viewRect = ToMinimapRect(viewportWorld); + viewRect.xMin = Mathf.Max(viewRect.xMin, 0); + viewRect.yMin = Mathf.Max(viewRect.yMin, 0); + viewRect.xMax = Mathf.Min(viewRect.xMax, localRect.width); + viewRect.yMax = Mathf.Min(viewRect.yMax, localRect.height); + + painter.fillColor = new Color(1f, 1f, 0f, 0.05f); + painter.BeginPath(); + painter.MoveTo(new Vector2(viewRect.xMin, viewRect.yMin)); + painter.LineTo(new Vector2(viewRect.xMax, viewRect.yMin)); + painter.LineTo(new Vector2(viewRect.xMax, viewRect.yMax)); + painter.LineTo(new Vector2(viewRect.xMin, viewRect.yMax)); + painter.ClosePath(); + painter.Fill(); + + painter.strokeColor = Color.yellow; + painter.lineWidth = 1.5f; + painter.BeginPath(); + painter.MoveTo(new Vector2(viewRect.xMin, viewRect.yMin)); + painter.LineTo(new Vector2(viewRect.xMax, viewRect.yMin)); + painter.LineTo(new Vector2(viewRect.xMax, viewRect.yMax)); + painter.LineTo(new Vector2(viewRect.xMin, viewRect.yMax)); + painter.ClosePath(); + painter.Stroke(); + } + + private void OnPointerDown(PointerDownEvent evt) + { + if (_context?.graph == null || _widgets.Count == 0 || evt.button != 0) return; + + var canvas = _context.canvas; + if (canvas == null) return; + + Vector2 mousePos = evt.localPosition; + Vector2 mouseWorld = (mousePos - _minimapOffset) / _scale + _combinedBounds.min; + + var selection = canvas.selection; + bool contextIsValid = GraphContextProvider.instance.IsValid(_context.reference); + + List hitWidgets = new List(); + IGraphElementWidget closest = null; + float closestDistSq = float.MaxValue; + + foreach (var widget in _widgets) + { + if (widget == null || !canvas.widgetProvider.IsValid(widget.item) || !contextIsValid) continue; + + Rect drawRect = ToMinimapRect(widget.position); + + if (drawRect.Contains(mousePos)) + hitWidgets.Add(widget); + + float distSq = (widget.position.center - mouseWorld).sqrMagnitude; + if (distSq < closestDistSq) + { + closestDistSq = distSq; + closest = widget; + } + } + + IGraphElementWidget target; + if (hitWidgets.Count > 0) + { + int index = 0; + if (_selectedWidget != null) + { + int i = hitWidgets.IndexOf(_selectedWidget); + if (i >= 0) index = (i + 1) % hitWidgets.Count; + } + target = hitWidgets[index]; + } + else + { + target = closest; + } + + if (target != null) + { + _selectedWidget = target; + + GraphUtility.OverrideContextIfNeeded(() => + { + if (target.canSelect) + { + if (evt.actionKey) + selection.Add(target.element); + else + selection.Select(target.element); + } + + canvas.ViewElements(target.element.Yield()); + }); + + evt.StopPropagation(); + } + } + + private Rect ToMinimapRect(Rect worldRect) + { + return new Rect + { + position = (worldRect.position - _combinedBounds.min) * _scale + _minimapOffset, + size = worldRect.size * _scale + }; + } + + private static Color GetElementColor(IWidget widget) + { + if (widget is IUnitWidget) + { + if (widget is CommentNodeWidget comment) return comment.element.color; + if (widget is ArrowWidget arrowWidget) return arrowWidget.element.Color; + return Color.gray; + } + if (widget is GraphGroupWidget group) return group.element.color; + +#if VISUAL_SCRIPTING_1_8_0_OR_GREATER + if (widget is StickyNoteWidget sticky) return StickyNote.GetStickyColor(sticky.element.colorTheme); +#endif + return Color.white; + } + } +} \ No newline at end of file diff --git a/Editor/Internal/Patches/GraphMinimap/GraphMinimapRenderer.cs.meta b/Editor/Internal/Patches/GraphMinimap/GraphMinimapElement.cs.meta similarity index 100% rename from Editor/Internal/Patches/GraphMinimap/GraphMinimapRenderer.cs.meta rename to Editor/Internal/Patches/GraphMinimap/GraphMinimapElement.cs.meta diff --git a/Editor/Internal/Patches/GraphMinimap/GraphMinimapInstance.cs b/Editor/Internal/Patches/GraphMinimap/GraphMinimapInstance.cs index cc221d37..a3bc0f70 100644 --- a/Editor/Internal/Patches/GraphMinimap/GraphMinimapInstance.cs +++ b/Editor/Internal/Patches/GraphMinimap/GraphMinimapInstance.cs @@ -10,33 +10,21 @@ namespace Unity.VisualScripting.Community { internal sealed class GraphMinimapInstance : IDisposable { - private static readonly HashSet activeInstances = new HashSet(); - private static Vector2 MinimapSize - { - get => new Vector2(GraphMiniMapStorage.Settings.width, GraphMiniMapStorage.Settings.height); - set - { - GraphMiniMapStorage.Settings.width = value.x; - GraphMiniMapStorage.Settings.height = value.y; - GraphMiniMapStorage.MarkDirty(); - } - } - private static Vector2 lastMousePos = Vector2.zero; private readonly GraphWindow window; private IGraphContext context; private readonly VisualElement container; - private readonly IMGUIContainer background; + private readonly GraphMinimapElement minimapRenderer; private readonly Button toggle; private IGraph subscribedGraph; - private IEnumerable widgets = Enumerable.Empty(); - public Sidebars sidebars; - private bool minimized; + private Vector2 lastExpandedSize = new Vector2(GraphMinimapElement.DefaultX, GraphMinimapElement.DefaultY); + + private bool minimized => minimapRenderer == null || !minimapRenderer.value; private static readonly Color MinimapBackgroundDark = new Color(0f, 0f, 0f, 0.9f); private static readonly Color MinimapBackgroundLight = new Color(1f, 1f, 1f, 0.9f); @@ -46,30 +34,37 @@ private static Vector2 MinimapSize public GraphMinimapInstance(GraphWindow window) { - activeInstances.Add(this); - this.window = window; this.context = window.context; sidebars = (Sidebars)sidebarsField.GetValue(window); - minimized = GraphMiniMapStorage.Settings - .minimized - .TryGetValue(window.reference.ToString(), out var value) && value; - container = CreateContainer(); - background = CreateRenderer(); + minimapRenderer = CreateRenderer(); toggle = CreateToggle(); - container.Add(background); + minimapRenderer.RegisterValueChangedCallback(OnMinimapValueChanged); + + container.Add(minimapRenderer); container.Add(toggle); AddResizeHandle(container); window.rootVisualElement.Add(container); + minimapRenderer.RegisterCallback(Initialize); + + Subscribe(context); + } + public void Initialize(GeometryChangedEvent evt) + { UpdateState(); - Subscribe(context); + minimapRenderer.UnregisterCallback(Initialize); + } + + private void OnMinimapValueChanged(ChangeEvent evt) + { + UpdateState(); } public void Tick() @@ -81,7 +76,7 @@ public void Tick() if (!minimized) { - background.MarkDirtyRepaint(); + minimapRenderer.UpdateMinimap(context, widgets); } KeepMinimapAnchored(); @@ -111,12 +106,30 @@ private void OnElementsChanged() EditorApplication.delayCall += CacheWidgets; } + private readonly List _cachedWidgets = new List(); + public List widgets => _cachedWidgets; + private void CacheWidgets() { - if (context?.graph == null) + _cachedWidgets.Clear(); + + if (context?.graph?.elements == null || context.canvas == null) return; - widgets = context.graph.elements.Select(e => context.canvas.Widget(e)).OfType(); + var elements = context.graph.elements.ToList(); + int count = elements.Count; + + for (int i = 0; i < count; i++) + { + var element = elements[i]; + if (element == null) continue; + + var widget = context.canvas.Widget(element); + if (widget != null) + { + _cachedWidgets.Add(widget); + } + } } private void KeepMinimapAnchored() @@ -142,54 +155,59 @@ private VisualElement CreateContainer() var miniMapContainer = new VisualElement { style = - { - position = Position.Absolute, - #if NEW_TOOLBAR_STYLE - top = 60, - #else - top = 30, - #endif - right = 10, - width = Mathf.Min(MinimapSize.x, context.canvas.viewport.width - 25), - height = Mathf.Min(MinimapSize.y, context.canvas.viewport.height - 25), - backgroundColor = isDark ? MinimapBackgroundDark : MinimapBackgroundLight, - borderTopLeftRadius = 8, - borderTopRightRadius = 8, - borderBottomLeftRadius = 8, - borderBottomRightRadius = 8, - borderBottomWidth = 1, - borderTopWidth = 1, - borderLeftWidth = 1, - borderRightWidth = 1, - borderBottomColor = BorderColor, - borderLeftColor = BorderColor, - borderRightColor = BorderColor, - borderTopColor = BorderColor - }, + { + position = Position.Absolute, +#if NEW_TOOLBAR_STYLE + top = 60, +#else + top = 30, +#endif + right = 10, + width = 55, + height = 26, + backgroundColor = isDark ? MinimapBackgroundDark : MinimapBackgroundLight, + borderTopLeftRadius = 8, + borderTopRightRadius = 8, + borderBottomLeftRadius = 8, + borderBottomRightRadius = 8, + borderBottomWidth = 1, + borderTopWidth = 1, + borderLeftWidth = 1, + borderRightWidth = 1, + borderBottomColor = BorderColor, + borderLeftColor = BorderColor, + borderRightColor = BorderColor, + borderTopColor = BorderColor + }, pickingMode = PickingMode.Ignore }; return miniMapContainer; } - private IMGUIContainer CreateRenderer() + private GraphMinimapElement CreateRenderer() { - var imgui = new IMGUIContainer(Draw); - imgui.cullingEnabled = false; - - return imgui; + var renderer = new GraphMinimapElement + { + style = + { + width = Length.Percent(100), + height = Length.Percent(100), + position = Position.Absolute, + borderTopLeftRadius = 8, + borderTopRightRadius = 8, + borderBottomLeftRadius = 8, + borderBottomRightRadius = 8, + } + }; + return renderer; } private Button CreateToggle() { var button = new Button(() => { - minimized = !minimized; - GraphMiniMapStorage.Settings - .minimized[window.reference.ToString()] = minimized; - - GraphMiniMapStorage.MarkDirty(); - UpdateState(); + minimapRenderer.value = !minimapRenderer.value; }) { style = @@ -220,15 +238,15 @@ private void AddResizeHandle(VisualElement container) { name = "MinimapResizeHandle", style = - { - position = Position.Absolute, - bottom = 0, - left = 0, - width = 12, - height = 12, - backgroundColor = Color.clear, - cursor = UIElementsCursorUpdater.DefaultCursor(UIElementsCursorUpdater.CursorType.ResizeUpRight) - } + { + position = Position.Absolute, + bottom = 0, + left = 0, + width = 12, + height = 12, + backgroundColor = Color.clear, + cursor = UIElementsCursorUpdater.DefaultCursor(UIElementsCursorUpdater.CursorType.ResizeUpRight) + } }; container.Add(resizeHandle); @@ -236,6 +254,7 @@ private void AddResizeHandle(VisualElement container) bool resizing = false; resizeHandle.RegisterCallback(evt => { + if (minimized) return; resizing = true; lastMousePos = evt.mousePosition; resizeHandle.CaptureMouse(); @@ -244,19 +263,23 @@ private void AddResizeHandle(VisualElement container) resizeHandle.RegisterCallback(evt => { - if (!resizing) return; + if (!resizing || minimized) return; Vector2 delta = evt.mousePosition - lastMousePos; lastMousePos = evt.mousePosition; - float newWidth = Mathf.Clamp(container.resolvedStyle.width - delta.x, 200, Mathf.Min(600, window.context.canvas.viewport.width - 25)); - float newHeight = Mathf.Clamp(container.resolvedStyle.height + delta.y, 150, Mathf.Min(500, window.context.canvas.viewport.height - 25)); + float maxW = GetSafeMaxViewportWidth(); + float maxH = GetSafeMaxViewportHeight(); + + float newWidth = Mathf.Clamp(container.resolvedStyle.width - delta.x, 200, maxW); + float newHeight = Mathf.Clamp(container.resolvedStyle.height + delta.y, 150, maxH); + + lastExpandedSize = new Vector2(newWidth, newHeight); container.style.width = newWidth; container.style.height = newHeight; - SetGlobalSize(new Vector2(newWidth, newHeight)); - background.MarkDirtyRepaint(); + ApplySize(lastExpandedSize); evt.StopPropagation(); }); @@ -269,67 +292,71 @@ private void AddResizeHandle(VisualElement container) }); } - private static void SetGlobalSize(Vector2 size) - { - MinimapSize = size; - GraphMiniMapStorage.MarkDirty(); - - foreach (var instance in activeInstances) - { - instance.ApplySize(size); - } - } - private void ApplySize(Vector2 size) { if (minimized) return; - container.style.width = - Mathf.Min(size.x, context.canvas.viewport.width - 25); + float maxW = GetSafeMaxViewportWidth(); + float maxH = GetSafeMaxViewportHeight(); - container.style.height = - Mathf.Min(size.y, context.canvas.viewport.height - 25); + container.style.width = Mathf.Min(size.x, maxW); + container.style.height = Mathf.Min(size.y, maxH); - background.MarkDirtyRepaint(); + minimapRenderer.UpdateMinimap(context, widgets); } private void UpdateState() { - if (container == null || background == null || toggle == null) + if (container == null || minimapRenderer == null || toggle == null) return; + var resizeHandle = container.Q("MinimapResizeHandle"); + if (minimized) { - background.style.display = DisplayStyle.None; - container.style.height = 26; + minimapRenderer.style.display = DisplayStyle.None; container.style.width = 55; + container.style.height = 26; toggle.text = "+"; - container.Q("MinimapResizeHandle").style.display = DisplayStyle.None; + if (resizeHandle != null) resizeHandle.style.display = DisplayStyle.None; } else { - background.style.display = DisplayStyle.Flex; - container.style.width = Mathf.Min(MinimapSize.x, context.canvas.viewport.width - 25); - container.style.height = Mathf.Min(MinimapSize.y, context.canvas.viewport.height - 25); + minimapRenderer.style.display = DisplayStyle.Flex; + + float maxW = GetSafeMaxViewportWidth(); + float maxH = GetSafeMaxViewportHeight(); + + container.style.width = Mathf.Clamp(lastExpandedSize.x, 200, maxW); + container.style.height = Mathf.Clamp(lastExpandedSize.y, 150, maxH); + toggle.text = "—"; - container.Q("MinimapResizeHandle").style.display = DisplayStyle.Flex; + if (resizeHandle != null) resizeHandle.style.display = DisplayStyle.Flex; + + minimapRenderer.UpdateMinimap(context, widgets); } container.MarkDirtyRepaint(); } - private void Draw() + private float GetSafeMaxViewportWidth() { - if (minimized) - return; + return 600f; + } - MiniMapRenderer.Draw(context, widgets); + private float GetSafeMaxViewportHeight() + { + return 550f; } public void Dispose() { - activeInstances.Remove(this); + if (minimapRenderer != null) + { + minimapRenderer.UnregisterValueChangedCallback(OnMinimapValueChanged); + + } if (subscribedGraph != null) { diff --git a/Editor/Internal/Patches/GraphMinimap/GraphMinimapRenderer.cs b/Editor/Internal/Patches/GraphMinimap/GraphMinimapRenderer.cs deleted file mode 100644 index 717f4eb4..00000000 --- a/Editor/Internal/Patches/GraphMinimap/GraphMinimapRenderer.cs +++ /dev/null @@ -1,182 +0,0 @@ -using System.Collections.Generic; -using UnityEditor; -using UnityEngine; - -namespace Unity.VisualScripting.Community -{ - internal static class MiniMapRenderer - { - private static Vector2 MinimapSize => new Vector2( - GraphMiniMapStorage.Settings.width, - GraphMiniMapStorage.Settings.height - ); - - private static readonly List hitWidgets = new List(); - private static IGraphElementWidget selectedWidget; - - private const float Padding = 50f; - - public static void Draw(IGraphContext context, IEnumerable widgets) - { - if (context == null || context.graph == null) return; - - var canvas = context.graph.Canvas(); - if (canvas == null) return; - - Rect rect = GUILayoutUtility.GetRect(MinimapSize.x, MinimapSize.y); - GUI.BeginGroup(rect); - - Rect contentBounds = GraphGUI.CalculateArea(widgets); - contentBounds.xMin -= Padding; - contentBounds.yMin -= Padding; - contentBounds.xMax += Padding; - contentBounds.yMax += Padding; - - Rect viewportWorld = new Rect(canvas.pan - canvas.viewport.size * 0.5f, canvas.viewport.size); - Rect combinedBounds = contentBounds.Encompass(viewportWorld); - - float scaleX = rect.width / combinedBounds.width; - float scaleY = rect.height / combinedBounds.height; - float scale = scaleX < scaleY ? scaleX : scaleY; - if (scale <= 0f) { GUI.EndGroup(); return; } - - Vector2 minimapOffset = rect.center - combinedBounds.size * (scale * 0.5f); - Vector2 boundsMin = combinedBounds.min; - - Vector2 ToMinimap(Vector2 worldPos) - { - return (worldPos - boundsMin) * scale + minimapOffset; - } - - GraphUtility.OverrideContextIfNeeded(() => - { - hitWidgets.Clear(); - - var e = Event.current; - Vector2 mousePos = e.mousePosition; - Vector2 mouseWorld = (mousePos - minimapOffset) / scale + boundsMin; - - var selection = canvas.selection; - bool contextIsValid = GraphContextProvider.instance.IsValid(context.reference); - - IGraphElementWidget closest = null; - float closestDistSq = float.MaxValue; - - Rect drawRect = default; - - foreach (var widget in widgets) - { - if (!canvas.widgetProvider.IsValid(widget.item)) continue; - - if (widget == null) continue; - - if (!contextIsValid) continue; - - Rect wp = widget.position; - - drawRect.position = ToMinimap(wp.position); - drawRect.size = wp.size * scale; - - Handles.DrawSolidRectangleWithOutline( - drawRect, - GetElementColor(widget).WithAlpha(0.1f), - Color.white * (canvas.selection.Contains(widget.element) ? 1f : 0) - ); - - Vector2 center = wp.center; - Vector2 delta = center - mouseWorld; - float distSq = delta.sqrMagnitude; - - if (distSq < closestDistSq) - { - closestDistSq = distSq; - closest = widget; - } - - if (drawRect.Contains(mousePos)) - { - hitWidgets.Add(widget); - } - } - - if (e.type == EventType.MouseDown && e.button == 0) - { - IGraphElementWidget target = null; - - if (hitWidgets.Count > 0) - { - int index = 0; - if (selectedWidget != null) - { - int i = hitWidgets.IndexOf(selectedWidget); - if (i >= 0) index = (i + 1) % hitWidgets.Count; - } - target = hitWidgets[index]; - } - else - { - target = closest; - } - - if (target != null) - { - selectedWidget = target; - canvas.ViewElements(target.element.Yield()); - - if (target.canSelect) - { - if (e.shift) - selection.Add(target.element); - else - selection.Select(target.element); - } - - e.Use(); - } - } - }); - - Vector2 viewPos = ToMinimap(viewportWorld.position); - Vector2 viewSize = viewportWorld.size * scale; - - Rect viewRect = Rect.MinMaxRect( - Mathf.Max(viewPos.x, 0), - Mathf.Max(viewPos.y, 0), - Mathf.Min(viewPos.x + viewSize.x, MinimapSize.x), - Mathf.Min(viewPos.y + viewSize.y, MinimapSize.y) - ); - - Handles.DrawSolidRectangleWithOutline( - viewRect, - new Color(1f, 1f, 1f, 0.1f), - Color.yellow - ); - - GUI.EndGroup(); - } - - private static Color GetElementColor(IWidget widget) - { - if (widget is IUnitWidget unitWidget) - { - if (unitWidget is CommentNodeWidget commentNodeWidget) - return commentNodeWidget.element.color; - else if (unitWidget is ArrowWidget arrowWidget) - return arrowWidget.element.Color; - else - return Color.gray; - } - else if (widget is GraphGroupWidget group) - { - return group.element.color; - } -#if VISUAL_SCRIPTING_1_8_0_OR_GREATER - else if (widget is StickyNoteWidget sticky) - { - return StickyNote.GetStickyColor(sticky.element.colorTheme); - } -#endif - return Color.white; - } - } -} \ No newline at end of file diff --git a/Editor/Internal/Patches/GraphMinimap/GraphMinimapStorage.cs b/Editor/Internal/Patches/GraphMinimap/GraphMinimapStorage.cs deleted file mode 100644 index 3e8f988f..00000000 --- a/Editor/Internal/Patches/GraphMinimap/GraphMinimapStorage.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using UnityEngine; - -namespace Unity.VisualScripting.Community -{ - [Serializable] - public class GraphMiniMapSettings - { - public float width = 200f; - public float height = 150f; - public Dictionary minimized = new Dictionary(); - } - - public static class GraphMiniMapStorage - { - private static readonly string SettingsPath = "ProjectSettings/GraphMiniMapSettings.json"; - private static GraphMiniMapSettings _settings; - private static bool _isDirty; - - public static GraphMiniMapSettings Settings - { - get - { - if (_settings == null) - Load(); - return _settings; - } - } - - public static void Load() - { - if (File.Exists(SettingsPath)) - { - try - { - string json = File.ReadAllText(SettingsPath); - _settings = (GraphMiniMapSettings)new SerializationData(json).Deserialize() ?? new GraphMiniMapSettings(); - } - catch - { - _settings = new GraphMiniMapSettings(); - } - } - else - { - _settings = new GraphMiniMapSettings(); - } - } - - public static void Save() - { - try - { - Directory.CreateDirectory(Path.GetDirectoryName(SettingsPath)); - string json = _settings.Serialize().json; - File.WriteAllText(SettingsPath, json); - _isDirty = false; - } - catch (Exception e) - { - Debug.LogError($"[GraphMiniMap] Failed to save settings: {e}"); - } - } - - public static void MarkDirty() - { - _isDirty = true; - } - - public static void SaveIfNeeded() - { - if (_isDirty) - Save(); - } - } -} \ No newline at end of file diff --git a/Editor/Internal/Patches/GraphMinimap/GraphMinimapStorage.cs.meta b/Editor/Internal/Patches/GraphMinimap/GraphMinimapStorage.cs.meta deleted file mode 100644 index 6180051e..00000000 --- a/Editor/Internal/Patches/GraphMinimap/GraphMinimapStorage.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: a2fd95f13cc50264986dc6d01d2dfb43 \ No newline at end of file diff --git a/Editor/Internal/Patches/NesterAdaptor.cs b/Editor/Internal/Patches/NesterAdaptor.cs new file mode 100644 index 00000000..e67b514b --- /dev/null +++ b/Editor/Internal/Patches/NesterAdaptor.cs @@ -0,0 +1,180 @@ +using System.Reflection; +using Unity.VisualScripting.ReorderableList; +using UnityEditor; +using UnityEngine; + +namespace Unity.VisualScripting.Community +{ + public class NesterAdaptor : MetadataListAdaptor + { + public ReorderableListControl listControl; + private static readonly FieldInfo listControlFieldInfo = typeof(MetadataCollectionAdaptor).GetField("listControl", BindingFlags.NonPublic | BindingFlags.Instance); + + public NesterAdaptor(Metadata metadata, Inspector parentInspector) : base(metadata, parentInspector) + { + isExpanded = EditorPrefs.GetBool(ExpandedKey, true); + + if (listControlFieldInfo != null) + { + listControl = listControlFieldInfo.GetValueOptimized(this) as ReorderableListControl; + if (listControl != null) + { + listControl.Flags = ReorderableListFlags.HideAddButton | ReorderableListFlags.DisableContextMenu | ReorderableListFlags.DisableReordering; + } + } + } + + public override float GetItemHeight(float width, int index) + { + if (!isExpanded) return -4; + return EditorGUIUtility.singleLineHeight; + } + + protected override bool CanAdd() + { + return false; + } + + public override bool CanRemove(int index) + { + return false; + } + + private bool isExpanded = false; + + private const string ExpandedKey = "Community_FlowGraphEditor_NesterGraphs_Expanded"; + + protected override void OnTitleGUI(Rect position, GUIContent title) + { + EditorGUI.BeginChangeCheck(); + isExpanded = CommunityStyles.TitleFoldout(position, isExpanded, title); + if (EditorGUI.EndChangeCheck()) + { + EditorPrefs.SetBool(ExpandedKey, isExpanded); + } + } + + private static readonly RectOffset MissingSizeOffset = new RectOffset(0, 25, 0, 0); + public override void DrawItem(Rect position, int index) + { + if (!isExpanded || metadata[index] == null || metadata[index].value == null) return; + + var nesterElement = (IGraphNesterElement)metadata[index].value; + var nester = metadata[index]; + + var nestMetadata = nester[nameof(IGraphNesterElement.nest)]; + + var graphMetadata = nestMetadata?[nameof(IGraphNest.graph)]; + + try + { + if (graphMetadata?.value == null) + { + var helpBoxRect = position.ExpandByX(MissingSizeOffset); + EditorGUI.HelpBox(helpBoxRect, "Missing Graph Reference", MessageType.Warning); + + if (Event.current.type == EventType.MouseDown && helpBoxRect.Contains(Event.current.mousePosition)) + { + Event.current.Use(); + + var context = LudiqGraphsEditorUtility.editedContext.value; + if (context == null) context = GraphWindow.activeContext; + + if (context != null && context.reference != null && context.canvas != null) + { + context.canvas.ViewElements(new IGraphElement[] { (IGraphElement)nesterElement }); + } + } + return; + } + } + catch + { + return; + } + + var titleMetadata = graphMetadata[nameof(IGraph.title)]; + + const float buttonWidth = 50f; + const float iconSize = 16f; + const float spacing = 4f; + + position.width += buttonWidth / 2; + + var textureRect = new Rect(position.x, position.y + (position.height - iconSize) / 2, iconSize, iconSize); + GUI.DrawTexture(textureRect, nesterElement.GetType().Icon()?[IconSize.Small]); + + float titleWidth = position.width - iconSize - buttonWidth - (spacing * 2); + Rect titleRect = new Rect(position.x + iconSize + spacing, position.y, titleWidth, position.height); + + Rect buttonRect = new Rect(position.xMax - buttonWidth, position.y, buttonWidth, position.height - 4); + + string actualTitle = (string)titleMetadata.value; + string displayName = actualTitle; + + if (string.IsNullOrEmpty(actualTitle)) + { + displayName = GraphTraversal.GetNesterName(nesterElement); + } + + EditorGUI.BeginChangeCheck(); + + var userInput = EditorGUI.TextField(titleRect, displayName, EditorStyles.textField); + + if (EditorGUI.EndChangeCheck()) + { + if (userInput == GraphTraversal.GetNesterName(nesterElement)) + { + titleMetadata.value = string.Empty; + } + else + { + titleMetadata.value = userInput; + } + } + + if (GUI.Button(buttonRect, new GUIContent($"Open", $"Open {nesterElement.nest.source} graph"), EditorStyles.miniButton)) + { + var context = LudiqGraphsEditorUtility.editedContext.value; + + if (context == null) context = GraphWindow.activeContext; + + if (context == null || context.reference == null || context.canvas == null) return; + + context.canvas.window.reference = context.reference.ChildReference(nesterElement, false); + } + + HandleDragAndDrop(position, nesterElement); + } + + private void HandleDragAndDrop(Rect position, IGraphNesterElement nesterElement) + { + int controlID = GUIUtility.GetControlID(FocusType.Passive); + var e = Event.current; + + switch (e.GetTypeForControl(controlID)) + { + case EventType.MouseDown: + if (e.button == (int)MouseButton.Left && position.Contains(e.mousePosition)) + { + GUIUtility.hotControl = controlID; + e.Use(); + } + break; + + case EventType.MouseDrag: + if (GUIUtility.hotControl == controlID) + { + GUIUtility.hotControl = 0; + DragAndDrop.PrepareStartDrag(); + DragAndDrop.objectReferences = new UnityEngine.Object[0]; + DragAndDrop.paths = new string[0]; + DragAndDrop.SetGenericData("Graphs.NesterElementCopy", nesterElement.CloneViaFakeSerialization()); + DragAndDrop.StartDrag(metadata.path); + e.Use(); + } + break; + } + } + } +} \ No newline at end of file diff --git a/Editor/Internal/Patches/NesterAdaptor.cs.meta b/Editor/Internal/Patches/NesterAdaptor.cs.meta new file mode 100644 index 00000000..bf4fcca4 --- /dev/null +++ b/Editor/Internal/Patches/NesterAdaptor.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 5b6e2f61827f11b43950594b250ec2e5 \ No newline at end of file diff --git a/Editor/Internal/Patches/PatchedFlowGraphEditor.cs b/Editor/Internal/Patches/PatchedFlowGraphEditor.cs new file mode 100644 index 00000000..762ddb94 --- /dev/null +++ b/Editor/Internal/Patches/PatchedFlowGraphEditor.cs @@ -0,0 +1,178 @@ +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using JetBrains.Annotations; +using UnityEditor; +using UnityEngine; + +namespace Unity.VisualScripting.Community +{ + public class FlowGraphEditor : GraphEditor + { + public FlowGraphEditor(Metadata metadata) : base(metadata) + { + graph.units.ItemAdded += OnUnitAdded; + graph.units.ItemRemoved += OnItemRemoved; + + nesterMetadata = Metadata.Root().Object("editor", this).Member("nesters", BindingFlags.Instance | BindingFlags.NonPublic); + + nesterMetadata.value = new List(); + IEnumerable nesterUnits = graph.units.OfType(); + + nesterMetadata.value = nesterUnits + .Where(nester => nester.nest.source == GraphSource.Embed || nester == nesterUnits + .FirstOrDefault(n => n.nest.source == GraphSource.Macro && n.nest.macro == nester.nest.macro)).ToList(); + + nesterAdaptor = new NesterAdaptor(nesterMetadata, this); + } + + private bool nestersCached; + + [InspectorWide(true)] + [UsedImplicitly] + private List nesters = new List(); + + private NesterAdaptor nesterAdaptor; + + private void OnItemRemoved(IUnit unit) + { + if (unit is INesterUnit) nestersCached = false; + } + + private void OnUnitAdded(IUnit unit) + { + if (unit is INesterUnit) nestersCached = false; + } + + public override void Dispose() + { + graph.units.ItemAdded -= OnUnitAdded; + graph.units.ItemRemoved -= OnItemRemoved; + } + + private new FlowGraph graph => (FlowGraph)base.graph; + + private Metadata controlInputDefinitionsMetadata => metadata[nameof(FlowGraph.controlInputDefinitions)]; + private Metadata controlOutputDefinitionsMetadata => metadata[nameof(FlowGraph.controlOutputDefinitions)]; + private Metadata valueInputDefinitionsMetadata => metadata[nameof(FlowGraph.valueInputDefinitions)]; + private Metadata valueOutputDefinitionsMetadata => metadata[nameof(FlowGraph.valueOutputDefinitions)]; + + private readonly Metadata nesterMetadata; + + private IEnumerable warnings => UnitPortDefinitionUtility.Warnings((FlowGraph)metadata.value); + + protected override float GetHeight(float width, GUIContent label) + { + var height = 0f; + + height += GetHeaderHeight(width); + + height += GetControlInputDefinitionsHeight(width); + + height += EditorGUIUtility.standardVerticalSpacing; + + height += GetControlOutputDefinitionsHeight(width); + + height += EditorGUIUtility.standardVerticalSpacing; + + height += GetValueInputDefinitionsHeight(width); + + height += EditorGUIUtility.standardVerticalSpacing; + + height += GetValueOutputDefinitionsHeight(width); + + height += EditorGUIUtility.standardVerticalSpacing; + + height += LudiqGUI.GetInspectorHeight(this, nesterMetadata, width); + + height += EditorGUIUtility.standardVerticalSpacing; + + if (warnings.Any()) + { + height += EditorGUIUtility.standardVerticalSpacing; + + foreach (var warning in warnings) + { + height += warning.GetHeight(width) + 1f; + } + } + + return height; + } + + protected override void OnGUI(Rect position, GUIContent label) + { + if (!nestersCached) + { + IEnumerable nesterUnits = graph.units.OfType(); + + nesterMetadata.value = nesterUnits + .Where(nester => nester.nest.source == GraphSource.Embed || nester == nesterUnits + .FirstOrDefault(n => n.nest.source == GraphSource.Macro && n.nest.macro == nester.nest.macro)).ToList(); + nestersCached = true; + } + + BeginLabeledBlock(metadata, position, label); + + OnHeaderGUI(position); + + EditorGUI.BeginChangeCheck(); + + LudiqGUI.Inspector(controlInputDefinitionsMetadata, position.VerticalSection(ref y, GetControlInputDefinitionsHeight(position.width))); + + y += EditorGUIUtility.standardVerticalSpacing; + + LudiqGUI.Inspector(controlOutputDefinitionsMetadata, position.VerticalSection(ref y, GetControlOutputDefinitionsHeight(position.width))); + + y += EditorGUIUtility.standardVerticalSpacing; + + LudiqGUI.Inspector(valueInputDefinitionsMetadata, position.VerticalSection(ref y, GetValueInputDefinitionsHeight(position.width))); + + y += EditorGUIUtility.standardVerticalSpacing; + + LudiqGUI.Inspector(valueOutputDefinitionsMetadata, position.VerticalSection(ref y, GetValueOutputDefinitionsHeight(position.width))); + + if (EditorGUI.EndChangeCheck()) + { + graph.PortDefinitionsChanged(); + } + + y += EditorGUIUtility.standardVerticalSpacing; + + nesterAdaptor.Field(position.VerticalSection(ref y, nesterAdaptor.GetHeight(position.width, new GUIContent("Graphs"))), new GUIContent("Graphs")); + + if (warnings.Any()) + { + y += EditorGUIUtility.standardVerticalSpacing; + + foreach (var warning in warnings) + { + y--; + warning.OnGUI(position.VerticalSection(ref y, warning.GetHeight(position.width) + 1)); + } + } + + EndBlock(metadata); + } + + private float GetControlInputDefinitionsHeight(float width) + { + return LudiqGUI.GetInspectorHeight(this, controlInputDefinitionsMetadata, width); + } + + private float GetControlOutputDefinitionsHeight(float width) + { + return LudiqGUI.GetInspectorHeight(this, controlOutputDefinitionsMetadata, width); + } + + private float GetValueInputDefinitionsHeight(float width) + { + return LudiqGUI.GetInspectorHeight(this, valueInputDefinitionsMetadata, width); + } + + private float GetValueOutputDefinitionsHeight(float width) + { + return LudiqGUI.GetInspectorHeight(this, valueOutputDefinitionsMetadata, width); + } + } +} diff --git a/Editor/Internal/Patches/PatchedFlowGraphEditor.cs.meta b/Editor/Internal/Patches/PatchedFlowGraphEditor.cs.meta new file mode 100644 index 00000000..c2397d31 --- /dev/null +++ b/Editor/Internal/Patches/PatchedFlowGraphEditor.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 08f7aa8440a370547b01dc490d397084 \ No newline at end of file diff --git a/Editor/Internal/Patches/ProviderPatcher.cs b/Editor/Internal/Patches/ProviderPatcher.cs index dd1a3e70..a9f2973b 100644 --- a/Editor/Internal/Patches/ProviderPatcher.cs +++ b/Editor/Internal/Patches/ProviderPatcher.cs @@ -23,9 +23,18 @@ static ProviderPatcher() { PatchVariablesDeclarationsInspector(); PatchWidgets(); + PatchGraphEditors(); // PatchGraphContext(); } + private static void PatchGraphEditors() + { + var provider = EditorProvider.instance; + + PatchGlobalProvider(provider, typeof(FlowGraph)); + PatchGlobalProvider(provider, typeof(StateGraph)); + } + private static void PatchWidgets() { var descriptorProvider = DescriptorProvider.instance; @@ -291,10 +300,9 @@ private static void PatchVariablesDeclarationsInspector() #if NEW_VARIABLES_UI PatchGlobalProvider(provider, typeof(VariableDeclarations)); -#else +#endif PatchGlobalProvider(provider, typeof(VariableDeclaration)); -#endif } } } \ No newline at end of file diff --git a/Editor/Internal/Patches/StateGraphEditor.cs b/Editor/Internal/Patches/StateGraphEditor.cs new file mode 100644 index 00000000..7b2cb0ec --- /dev/null +++ b/Editor/Internal/Patches/StateGraphEditor.cs @@ -0,0 +1,88 @@ +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using JetBrains.Annotations; +using UnityEditor; +using UnityEngine; + +namespace Unity.VisualScripting.Community +{ + public class PatchedStateGraphEditor : GraphEditor + { + public PatchedStateGraphEditor(Metadata metadata) : base(metadata) + { + graph.elements.ItemAdded += OnUnitAdded; + graph.elements.ItemRemoved += OnItemRemoved; + + nesterMetadata = Metadata.Root().Object("editor", this).Member("nesters", BindingFlags.Instance | BindingFlags.NonPublic); + + nesterMetadata.value = null; + IEnumerable nesterUnits = graph.elements.OfType(); + + nesterMetadata.value = nesterUnits + .Where(nester => nester.nest.source == GraphSource.Embed || nester == nesterUnits + .FirstOrDefault(n => n.nest.source == GraphSource.Macro && n.nest.macro == nester.nest.macro)).ToList(); + + nesterAdaptor = new NesterAdaptor(nesterMetadata, this); + } + + private new StateGraph graph => (StateGraph)base.graph; + + private bool nestersCached; + + [InspectorWide(true)] + [UsedImplicitly] + private List nesters = new List(); + + private NesterAdaptor nesterAdaptor; + + private readonly Metadata nesterMetadata; + + private void OnItemRemoved(IGraphElement unit) + { + if (unit is IGraphNesterElement) nestersCached = false; + } + + private void OnUnitAdded(IGraphElement unit) + { + if (unit is IGraphNesterElement) nestersCached = false; + } + + public override void Dispose() + { + graph.elements.ItemAdded -= OnUnitAdded; + graph.elements.ItemRemoved -= OnItemRemoved; + } + + protected override float GetHeight(float width, GUIContent label) + { + var height = base.GetHeight(width, label); + + height += EditorGUIUtility.standardVerticalSpacing; + + height += LudiqGUI.GetInspectorHeight(this, nesterMetadata, width); + + return height; + } + + protected override void OnGUI(Rect position, GUIContent label) + { + base.OnGUI(position, label); + + if (!nestersCached) + { + IEnumerable nesterUnits = graph.elements.OfType(); + + nesterMetadata.value = nesterUnits + .Where(nester => nester.nest.source == GraphSource.Embed || nester == nesterUnits + .FirstOrDefault(n => n.nest.source == GraphSource.Macro && n.nest.macro == nester.nest.macro)).ToList(); + nestersCached = true; + } + + y += EditorGUIUtility.standardVerticalSpacing; + + nesterAdaptor.Field(position.VerticalSection(ref y, nesterAdaptor.GetHeight(position.width, new GUIContent("Graphs"))), new GUIContent("Graphs")); + } + + } +} diff --git a/Editor/Internal/Patches/StateGraphEditor.cs.meta b/Editor/Internal/Patches/StateGraphEditor.cs.meta new file mode 100644 index 00000000..447455c6 --- /dev/null +++ b/Editor/Internal/Patches/StateGraphEditor.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 4215e1d60e8ba4b42965b105dd3a4b56 \ No newline at end of file diff --git a/Editor/Internal/Processes/KeyboardControlProcess.cs b/Editor/Internal/Processes/KeyboardControlProcess.cs index 972021f7..8565cea7 100644 --- a/Editor/Internal/Processes/KeyboardControlProcess.cs +++ b/Editor/Internal/Processes/KeyboardControlProcess.cs @@ -203,7 +203,7 @@ private void TryInsertReroute(FlowGraph graph, FlowCanvas canvas, IUnitPort sour var destinationPos = destinationWidget.position; var reroutePos = rerouteWidget.position; - rerouteWidget.position = new Rect(destinationPos.xMin - reroutePos.width - 35, destinationPos.position.y - 4, reroutePos.width, reroutePos.height); + rerouteWidget.position = new Rect(destinationPos.xMin - reroutePos.width - 40, destinationPos.position.y - 1, reroutePos.width, reroutePos.height); rerouteWidget.Reposition(); } finally diff --git a/Editor/Internal/ScriptingDefineUtility.cs b/Editor/Internal/ScriptingDefineUtility.cs index b6b9d0db..3f398de7 100644 --- a/Editor/Internal/ScriptingDefineUtility.cs +++ b/Editor/Internal/ScriptingDefineUtility.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Collections.Generic; using UnityEditor.Build; +using UnityEditor.Build.Profile; namespace Unity.VisualScripting.Community { @@ -16,7 +17,6 @@ public static class ScriptingDefineUtility private const string UNIT_STYLE = "NEW_UNIT_STYLE"; private const string TOOLBAR_STYLE = "NEW_TOOLBAR_STYLE"; private const string GRAPH_MINIMAP = "ENABLE_GRAPH_MINIMAP"; - private const string DARK_UI = "DARKER_UI"; private const string NEW_VARIABLES_UI = "NEW_VARIABLES_UI"; private const string NEW_LIST_UI = "NEW_LIST_UI"; private const string NEW_DICTIONARY_UI = "NEW_DICTIONARY_UI"; @@ -29,7 +29,6 @@ static ScriptingDefineUtility() UpdateUnitStyle(); UpdateToolbarStyle(); UpdateGraphMiniMap(); - UpdateDarkUI(); UpdateVariablesUI(); UpdateListUI(); UpdateDictionaryUI(); @@ -61,11 +60,6 @@ public static void UpdateGraphMiniMap() SetDefine(GRAPH_MINIMAP, EditorPrefs.GetBool(ProjectSettingsProviderView.GraphMinimapKey, false)); } - public static void UpdateDarkUI() - { - SetDefine(DARK_UI, EditorPrefs.GetBool(ProjectSettingsProviderView.DarkerUIKey, false)); - } - public static void UpdateVariablesUI() { SetDefine(NEW_VARIABLES_UI, EditorPrefs.GetBool(ProjectSettingsProviderView.NewVariablesUIKey, false)); @@ -85,31 +79,62 @@ public static void SetDefine(string symbol, bool enabled) { if (string.IsNullOrWhiteSpace(symbol)) return; +#if UNITY_6000_0_OR_NEWER + BuildProfile activeProfile = BuildProfile.GetActiveBuildProfile(); + + if (activeProfile != null) + { + List list = activeProfile.scriptingDefines != null + ? activeProfile.scriptingDefines.Where(d => !string.IsNullOrWhiteSpace(d)).ToList() + : new List(); + + bool changed = false; + if (enabled && !list.Contains(symbol)) + { + list.Add(symbol); + changed = true; + } + else if (!enabled && list.Contains(symbol)) + { + list.Remove(symbol); + changed = true; + } + + if (changed) + { + activeProfile.scriptingDefines = list.ToArray(); + EditorUtility.SetDirty(activeProfile); + AssetDatabase.SaveAssetIfDirty(activeProfile); + } + return; + } +#endif + #if UNITY_2022_1_OR_NEWER var target = NamedBuildTarget.FromBuildTargetGroup(EditorUserBuildSettings.selectedBuildTargetGroup); - string defines = PlayerSettings.GetScriptingDefineSymbols(target); + string definesString = PlayerSettings.GetScriptingDefineSymbols(target); #else var target = EditorUserBuildSettings.selectedBuildTargetGroup; - string defines = PlayerSettings.GetScriptingDefineSymbolsForGroup(target); + string definesString = PlayerSettings.GetScriptingDefineSymbolsForGroup(target); #endif - List list = defines.Split(';').Where(d => !string.IsNullOrWhiteSpace(d)).ToList(); - bool changed = false; + List legacyList = definesString.Split(';').Where(d => !string.IsNullOrWhiteSpace(d)).ToList(); + bool legacyChanged = false; - if (enabled && !list.Contains(symbol)) + if (enabled && !legacyList.Contains(symbol)) { - list.Add(symbol); - changed = true; + legacyList.Add(symbol); + legacyChanged = true; } - else if (!enabled && list.Contains(symbol)) + else if (!enabled && legacyList.Contains(symbol)) { - list.Remove(symbol); - changed = true; + legacyList.Remove(symbol); + legacyChanged = true; } - if (!changed) return; + if (!legacyChanged) return; - string result = string.Join(";", list); + string result = string.Join(";", legacyList); #if UNITY_2022_1_OR_NEWER PlayerSettings.SetScriptingDefineSymbols(target, result); diff --git a/Editor/Nodes/Events/Resources/return.png.meta b/Editor/Nodes/Events/Resources/return.png.meta index 0d8521be..531aff24 100644 --- a/Editor/Nodes/Events/Resources/return.png.meta +++ b/Editor/Nodes/Events/Resources/return.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 818a917ccaff66a4b95ec02dbb402dbd TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -995779289211046693 + second: return_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -32,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -51,17 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 @@ -71,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 @@ -83,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: return_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: bd472e723084e22f0800000000000000 + internalID: -995779289211046693 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -98,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Events/Resources/return@Pro.png.meta b/Editor/Nodes/Events/Resources/return@Pro.png.meta index 10f2ee4f..b37f1228 100644 --- a/Editor/Nodes/Events/Resources/return@Pro.png.meta +++ b/Editor/Nodes/Events/Resources/return@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 1555510bc861aaf45a991646c58d78c2 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -9028082845167450635 + second: return@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -32,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -51,17 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 @@ -71,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 @@ -83,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: return@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 5f50ff23c7ec5b280800000000000000 + internalID: -9028082845167450635 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -98,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Events/Resources/return_event.png.meta b/Editor/Nodes/Events/Resources/return_event.png.meta index 73ff1907..dcdf1af4 100644 --- a/Editor/Nodes/Events/Resources/return_event.png.meta +++ b/Editor/Nodes/Events/Resources/return_event.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 5aab74d0b11d00b4a80a3cf436ea3cca TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 3058852381063108299 + second: return_event_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -51,7 +56,9 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 @@ -62,8 +69,10 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -73,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -85,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: return_event_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: bc6df99b80a337a20800000000000000 + internalID: 3058852381063108299 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -100,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Events/Resources/return_event@Pro.png.meta b/Editor/Nodes/Events/Resources/return_event@Pro.png.meta index e08db15a..1165c4eb 100644 --- a/Editor/Nodes/Events/Resources/return_event@Pro.png.meta +++ b/Editor/Nodes/Events/Resources/return_event@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 2cf450b0769dd7144abab64157dd9ecc TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -2913948437038840684 + second: return_event@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -32,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -51,17 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 @@ -71,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 @@ -83,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: return_event@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 494ce74d5539f87d0800000000000000 + internalID: -2913948437038840684 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -98,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/CommunityGraphContextExtensions.cs b/Editor/Nodes/Fundamentals/CommunityFlowGraphContextExtensions.cs similarity index 64% rename from Editor/Nodes/Fundamentals/CommunityGraphContextExtensions.cs rename to Editor/Nodes/Fundamentals/CommunityFlowGraphContextExtensions.cs index 5647ee71..b3952993 100644 --- a/Editor/Nodes/Fundamentals/CommunityGraphContextExtensions.cs +++ b/Editor/Nodes/Fundamentals/CommunityFlowGraphContextExtensions.cs @@ -1,18 +1,39 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Reflection; +using UnityEditor; using UnityEngine; namespace Unity.VisualScripting.Community { [GraphContextExtension(typeof(FlowGraphContext))] - public class CommunityGraphContextExtensions : GraphContextExtension + public class CommunityFlowGraphContextExtensions : GraphContextExtension { - public CommunityGraphContextExtensions(FlowGraphContext context) : base(context) + public CommunityFlowGraphContextExtensions(FlowGraphContext context) : base(context) { } + public override bool AcceptsDragAndDrop() + { + return DragAndDrop.GetGenericData("Graphs.NesterElementCopy") is IUnit; + } + + public override void DrawDragAndDropPreview() + { + var element = DragAndDrop.GetGenericData("Graphs.NesterElementCopy") as IGraphNesterElement; + var name = GraphTraversal.GetNesterName(element); + GraphGUI.DrawDragAndDropPreviewLabel(new Vector2(e.mousePosition.x, e.mousePosition.y), "Add: " + name, element.GetType().Icon()); + } + + public override void PerformDragAndDrop() + { + var element = DragAndDrop.GetGenericData("Graphs.NesterElementCopy") as IGraphNesterElement; + element.guid = Guid.NewGuid(); + graph.elements.Add(element); + if (element is IUnit unit) unit.position = e.mousePosition; + } + + public override DragAndDropVisualMode dragAndDropVisualMode => DragAndDropVisualMode.Copy; + public override IEnumerable contextMenuItems { get diff --git a/Editor/Nodes/Fundamentals/CommunityGraphContextExtensions.cs.meta b/Editor/Nodes/Fundamentals/CommunityFlowGraphContextExtensions.cs.meta similarity index 100% rename from Editor/Nodes/Fundamentals/CommunityGraphContextExtensions.cs.meta rename to Editor/Nodes/Fundamentals/CommunityFlowGraphContextExtensions.cs.meta diff --git a/Editor/Nodes/Fundamentals/CommunityStateGraphContextExtensions.cs b/Editor/Nodes/Fundamentals/CommunityStateGraphContextExtensions.cs new file mode 100644 index 00000000..0f106232 --- /dev/null +++ b/Editor/Nodes/Fundamentals/CommunityStateGraphContextExtensions.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace Unity.VisualScripting.Community +{ + [GraphContextExtension(typeof(StateGraphContext))] + public class CommunityStateGraphContextExtensions : GraphContextExtension + { + public CommunityStateGraphContextExtensions(StateGraphContext context) : base(context) + { + } + + public override bool AcceptsDragAndDrop() + { + return DragAndDrop.GetGenericData("Graphs.NesterElementCopy") is IState; + } + + public override void DrawDragAndDropPreview() + { + var element = DragAndDrop.GetGenericData("Graphs.NesterElementCopy") as IGraphNesterElement; + var name = GraphTraversal.GetNesterName(element); + GraphGUI.DrawDragAndDropPreviewLabel(new Vector2(e.mousePosition.x, e.mousePosition.y), "Add: " + name, element.GetType().Icon()); + } + + public override void PerformDragAndDrop() + { + var element = DragAndDrop.GetGenericData("Graphs.NesterElementCopy") as IGraphNesterElement; + element.guid = Guid.NewGuid(); + graph.elements.Add(element); + if (element is IState state) state.position = e.mousePosition; + } + + public override DragAndDropVisualMode dragAndDropVisualMode => DragAndDropVisualMode.Copy; + + public override IEnumerable contextMenuItems + { + get + { + foreach (var item in base.contextMenuItems) + { + yield return item; + } + + yield return new GraphContextMenuItem(OpenNodeFinder, "Windows/Open NodeFinder Window"); + yield return new GraphContextMenuItem(OpenUtilityWindow, "Windows/Open Utility Window"); + yield return new GraphContextMenuItem(OpenGraphSnippetPopup, "Windows/Open Graph Snippets Window"); + } + } + + private void OpenGraphSnippetPopup(Vector2 _) + { + Rect rect = new Rect(e.mousePosition.x, e.mousePosition.y, 0, 0); + + GraphSnippetsPopup.Show(rect); + } + + private void ConvertToEmbed(Vector2 _) + { + NodeSelection.Convert(GraphSource.Embed); + } + + private void ConvertToMacro(Vector2 _) + { + NodeSelection.Convert(GraphSource.Macro); + } + + private void OpenUtilityWindow(Vector2 _) + { + var window = UtilityWindow.Open(); + window.graphContext = context; + } + + private void OpenNodeFinder(Vector2 _) + { + NodeFinderWindow.Open(); + } + } +} \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/CommunityStateGraphContextExtensions.cs.meta b/Editor/Nodes/Fundamentals/CommunityStateGraphContextExtensions.cs.meta new file mode 100644 index 00000000..5be17d29 --- /dev/null +++ b/Editor/Nodes/Fundamentals/CommunityStateGraphContextExtensions.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 0223196fa569ff24fb84056030f7a680 diff --git a/Editor/Nodes/Fundamentals/Editors/Delegates/BindDelegateNodeEditor.cs b/Editor/Nodes/Fundamentals/Editors/Delegates/BindDelegateNodeEditor.cs index fc661f1e..4eb24d02 100644 --- a/Editor/Nodes/Fundamentals/Editors/Delegates/BindDelegateNodeEditor.cs +++ b/Editor/Nodes/Fundamentals/Editors/Delegates/BindDelegateNodeEditor.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System; using System.Reflection; +using UnityEngine.Assemblies; +using System.Linq; namespace Unity.VisualScripting.Community { @@ -40,7 +42,12 @@ protected override void OnInspectorGUI(Rect position) GenericMenu menu = new GenericMenu(); List result = new List(); + +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif for (int assembly = 0; assembly < assemblies.Length; assembly++) { diff --git a/Editor/Nodes/Fundamentals/Editors/Delegates/DelegateInvokeNodeEditor.cs b/Editor/Nodes/Fundamentals/Editors/Delegates/DelegateInvokeNodeEditor.cs index bbb7dca8..541e713b 100644 --- a/Editor/Nodes/Fundamentals/Editors/Delegates/DelegateInvokeNodeEditor.cs +++ b/Editor/Nodes/Fundamentals/Editors/Delegates/DelegateInvokeNodeEditor.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System; using System.Reflection; +using UnityEngine.Assemblies; +using System.Linq; namespace Unity.VisualScripting.Community { @@ -40,7 +42,12 @@ protected override void OnInspectorGUI(Rect position) GenericMenu menu = new GenericMenu(); List result = new List(); + +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif for (int assembly = 0; assembly < assemblies.Length; assembly++) { diff --git a/Editor/Nodes/Fundamentals/Editors/Delegates/DelegateNodeEditor.cs b/Editor/Nodes/Fundamentals/Editors/Delegates/DelegateNodeEditor.cs index d006babe..32937096 100644 --- a/Editor/Nodes/Fundamentals/Editors/Delegates/DelegateNodeEditor.cs +++ b/Editor/Nodes/Fundamentals/Editors/Delegates/DelegateNodeEditor.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System; using System.Reflection; +using UnityEngine.Assemblies; +using System.Linq; namespace Unity.VisualScripting.Community { @@ -42,7 +44,12 @@ protected override void OnInspectorGUI(Rect position) GenericMenu menu = new GenericMenu(); List result = new List(); - Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); + +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else + Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif for (int assembly = 0; assembly < assemblies.Length; assembly++) { diff --git a/Editor/Nodes/Fundamentals/Editors/Delegates/UnbindDelegateNodeEditor.cs b/Editor/Nodes/Fundamentals/Editors/Delegates/UnbindDelegateNodeEditor.cs index 75fbdd2d..fa4b0814 100644 --- a/Editor/Nodes/Fundamentals/Editors/Delegates/UnbindDelegateNodeEditor.cs +++ b/Editor/Nodes/Fundamentals/Editors/Delegates/UnbindDelegateNodeEditor.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System; using System.Reflection; +using UnityEngine.Assemblies; +using System.Linq; namespace Unity.VisualScripting.Community { @@ -40,7 +42,12 @@ protected override void OnInspectorGUI(Rect position) GenericMenu menu = new GenericMenu(); List result = new List(); + +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif for (int assembly = 0; assembly < assemblies.Length; assembly++) { diff --git a/Editor/Nodes/Fundamentals/Inspectors/Dictionary/DictionaryAdaptor.cs b/Editor/Nodes/Fundamentals/Inspectors/Dictionary/DictionaryAdaptor.cs index 7a2c8f92..4d581bee 100644 --- a/Editor/Nodes/Fundamentals/Inspectors/Dictionary/DictionaryAdaptor.cs +++ b/Editor/Nodes/Fundamentals/Inspectors/Dictionary/DictionaryAdaptor.cs @@ -1,266 +1,191 @@ +using System; +using System.Collections; using System.Collections.Generic; using System.Reflection; +using Unity.VisualScripting.Community.Libraries.Humility; +using Unity.VisualScripting.ReorderableList; using UnityEditor; using UnityEngine; -using Unity.VisualScripting.ReorderableList; -using System; -using Unity.VisualScripting.Community.Libraries.Humility; -using System.Collections; namespace Unity.VisualScripting.Community { public class DictionaryAdaptor : MetadataDictionaryAdaptor, IReorderableListDropTarget { + public ReorderableListControl listControl; + public Metadata Metadata; + public event Action valueChanged; + private readonly List foldoutStates = new List(); + private Metadata newKeyMetadata; + private Metadata newValueMetadata; + private bool newItemExpanded = false; private const float FoldoutHeight = 20f; private const float FieldHeight = 18f; private const float Spacing = 4f; private const float DeleteButtonWidth = 18f; - private const float spaceBetweenKeyAndValue = 5; - private const float itemPadding = 2; - - private Metadata newKeyMetadata; - private Metadata newValueMetadata; + private const float SpaceBetweenKeyAndValue = 5f; + private const float ItemPadding = 2f; + private const float FoldoutArrowWidth = 12f; + private const float AdaptiveWidthPadding = 10f; + private const float ExtraItemPadding = 8f; private static readonly FieldInfo listControlFieldInfo = typeof(MetadataCollectionAdaptor).GetField("listControl", BindingFlags.NonPublic | BindingFlags.Instance); private static readonly PropertyInfo metadataLabelProperty = typeof(Metadata).GetProperty("label", BindingFlags.Instance | BindingFlags.Public); - public ReorderableListControl listControl; - public DictionaryAdaptor(Metadata metadata, Inspector parent) : base(metadata, parent) { Metadata = metadata; - valueChanged += (previousValue) => - { - Initialize(); - }; - metadata.valueChanged += (previousValue) => - { - Initialize(); - }; + Action reinitialize = (previousValue) => Initialize(); + valueChanged += reinitialize; + metadata.valueChanged += reinitialize; - if (listControlFieldInfo != null) + if (listControlFieldInfo?.GetValue(this) is ReorderableListControl control) { - listControl = listControlFieldInfo.GetValue(this) as ReorderableListControl; - if (listControl != null) - { - listControl.ContainerStyle = GUIStyle.none; - listControl.Flags = ReorderableListFlags.HideRemoveButtons | ReorderableListFlags.DisableReordering; - listControl.HorizontalLineColor = EditorGUIUtility.isProSkin ? Color.black : Color.white; - listControl.HorizontalLineAtStart = true; - listControl.HorizontalLineAtEnd = true; - } + listControl = control; + listControl.Flags = ReorderableListFlags.DisableReordering; } } -#if DARKER_UI - // I have to do this setup to change the color of the add button - // It's very hacky but seems to work better than tinting the background Texture. - private Color _previousBackgroundColor; - private bool _tintApplied; - - public override void BeginGUI() - { - if (_tintApplied) - { - GUI.backgroundColor = _previousBackgroundColor; - _tintApplied = false; - } - } - - public override void EndGUI() - { - _previousBackgroundColor = GUI.backgroundColor; - GUI.backgroundColor = CommunityStyles.backgroundColor.Brighten(0.36f); - _tintApplied = true; - } -#endif private void Initialize() { if (!metadata.isDictionary) - { - throw new InvalidOperationException("Metadata for dictionary adaptor is not a dictionary: " + metadata); - } + throw new InvalidOperationException($"Metadata for dictionary adaptor is not a dictionary: {metadata}"); - if (metadata.value == null) - { - metadata.value = ConstructDictionary(); - } + metadata.value ??= ConstructDictionary(); newKeyMetadata?.Unlink(); newValueMetadata?.Unlink(); - // It seems like Unlink is not enough. - // so we make sure to give it a new name - var guid = GUID.Generate().ToString(); - - // Todo: Find a way to overwrite the key and value - // instead of using a new key. + string guid = GUID.Generate().ToString(); newKeyMetadata = metadata.Object($"newKey_{guid}", ConstructKey(), metadata.dictionaryKeyType); newValueMetadata = metadata.Object($"newValue_{guid}", ConstructValue(), metadata.dictionaryValueType); - // Some Metadata types use this, so we insure that its not null. - metadataLabelProperty.SetValue(newKeyMetadata, GUIContent.none); - metadataLabelProperty.SetValue(newValueMetadata, GUIContent.none); + metadataLabelProperty?.SetValue(newKeyMetadata, GUIContent.none); + metadataLabelProperty?.SetValue(newValueMetadata, GUIContent.none); } protected override IDictionary ConstructDictionary() { - if (metadata.dictionaryType == typeof(IDictionary)) return new AotDictionary(); - else if (metadata.dictionaryType.IsGenericType && metadata.dictionaryType.GetGenericTypeDefinition() == typeof(IDictionary<,>)) + if (metadata.dictionaryType == typeof(IDictionary)) + return new AotDictionary(); + + if (metadata.dictionaryType.IsGenericType && metadata.dictionaryType.GetGenericTypeDefinition() == typeof(IDictionary<,>)) { var args = metadata.dictionaryType.GetGenericArguments(); return (IDictionary)Activator.CreateInstance(typeof(Dictionary<,>).MakeGenericType(args[0], args[1])); } - return base.ConstructDictionary(); - } - protected override object ConstructKey() - { - return base.ConstructKey(); + return base.ConstructDictionary(); } protected override object ConstructValue() { - if (metadata.dictionaryValueType == typeof(object)) return null; - if (typeof(UnityEngine.Object).IsAssignableFrom(metadata.dictionaryValueType)) return null; - return metadata.dictionaryValueType.PseudoDefault() ?? metadata.dictionaryValueType.TryInstantiate(false) ?? base.ConstructKey(); - } - - public Metadata Metadata; + if (metadata.dictionaryValueType == typeof(object) || typeof(UnityEngine.Object).IsAssignableFrom(metadata.dictionaryValueType)) + return null; - private void EnsureFoldoutCount(int index) - { - if (index == Count - 1) return; - - while (foldoutStates.Count <= index) - { - foldoutStates.Add(false); - parentInspector.SetHeightDirty(); - } + return metadata.dictionaryValueType.PseudoDefault() ?? + metadata.dictionaryValueType.TryInstantiate(false) ?? + base.ConstructKey(); } public override float GetItemHeight(float width, int index) { - EnsureFoldoutCount(index); + EnsureFoldoutStateSynced(index); - bool expanded = (index == Count - 1) ? newItemExpanded : foldoutStates[index]; - - if (!expanded) - return FoldoutHeight + Spacing; + bool isNewItem = index == Count - 1; + bool expanded = isNewItem ? newItemExpanded : foldoutStates[index]; - if (index == Count - 1) - return FoldoutHeight + GetItemHeight(newKeyMetadata, newValueMetadata, index) + 8f; + if (!expanded) return FoldoutHeight + Spacing; - return FoldoutHeight + GetItemHeight(metadata.KeyMetadata(index), metadata.ValueMetadata(index), index) + 8f; - } + float contentHeight = isNewItem + ? GetItemContentHeight(newKeyMetadata, newValueMetadata, width) + : GetItemContentHeight(metadata.KeyMetadata(index), metadata.ValueMetadata(index), width); - public override void DrawItemBackground(Rect position, int index) - { -#if DARKER_UI - EditorGUI.DrawRect(position, CommunityStyles.backgroundColor); -#else - EditorGUI.DrawRect(position, ColorPalette.unityBackgroundLight); -#endif - - var restoredColor = Handles.color; - Handles.color = Color.gray * 0.6f; - Handles.DrawAAPolyLine(2f, new Vector3[] - { - new Vector3(position.x, position.y + 1), - new Vector3(position.xMax, position.y + 1), - new Vector3(position.xMax, position.yMax), - new Vector3(position.x, position.yMax), - new Vector3(position.x, position.y) - }); - Handles.color = restoredColor; + return FoldoutHeight + contentHeight + ExtraItemPadding; } - private bool newItemExpanded = false; - public override void DrawItem(Rect position, int index) { - EnsureFoldoutCount(index); + EnsureFoldoutStateSynced(index); bool isNewItem = index == Count - 1; + Rect foldoutRect = new Rect(position.x + Spacing, position.y + Spacing, position.width, FieldHeight); - bool expanded = isNewItem ? newItemExpanded : foldoutStates[index]; - - float lineY = position.y + (FoldoutHeight - 8) / 2f; - - Rect foldoutRect = new Rect(position.x + Spacing, position.y + 4, position.width - DeleteButtonWidth - 35, FieldHeight); - Rect arrowRect = new Rect(foldoutRect.x, lineY, 12, 12); + GUIContent label = isNewItem + ? new GUIContent("New Item") + : CommunityStyles.GetCollectionDisplayName(metadata.KeyMetadata(index), index, true); - Texture2D arrowTex = expanded ? CommunityStyles.ArrowDownTexture : CommunityStyles.ArrowRightTexture; - if (arrowTex != null) - GUI.DrawTexture(arrowRect, arrowTex, ScaleMode.ScaleToFit, true); + bool expanded = DrawFoldout(foldoutRect, index, label, isNewItem); - GUIContent label = isNewItem ? new GUIContent("New Item") : CommunityStyles.GetCollectionDisplayName(metadata.KeyMetadata(index), index, true); - Rect labelRect = new Rect(foldoutRect.x + 16, lineY - 3, foldoutRect.width - 16, FieldHeight); - GUI.Label(labelRect, label, EditorStyles.label); + if (expanded) + { + DrawExpandedContent(position, index, isNewItem); + } if (!isNewItem) { - Rect deleteRect = new Rect(position.x + position.width - DeleteButtonWidth - 4, lineY - 2, DeleteButtonWidth - 2, FieldHeight - 2); - if (GUI.Button(deleteRect, GUIContent.none, new GUIStyle(EditorStyles.whiteLabel) - { - normal = { background = CommunityStyles.RemoveItemTexture } - })) - { - Remove(index); - return; - } + HandleDragAndDrop(position, index); } + } - if (Event.current.type == EventType.MouseDown && arrowRect.Contains(Event.current.mousePosition)) + private bool DrawFoldout(Rect foldoutRect, int index, GUIContent label, bool isNewItem) + { + using (new EditorGUIUtility.IconSizeScope(new Vector2(IconSize.Small, IconSize.Small))) { - if (isNewItem) - newItemExpanded = !newItemExpanded; - else - foldoutStates[index] = !expanded; + var oldHierarchyMode = EditorGUIUtility.hierarchyMode; + EditorGUIUtility.hierarchyMode = false; - parentInspector.SetHeightDirty(); - - Event.current.Use(); - } + EditorGUI.BeginChangeCheck(); - if (expanded) - { - Rect contentRect = new Rect(position.x, position.y + FoldoutHeight + Spacing, position.width - Spacing, position.height - FoldoutHeight - Spacing); + bool expanded = isNewItem + ? (newItemExpanded = EditorGUI.Foldout(foldoutRect, newItemExpanded, label)) + : (foldoutStates[index] = EditorGUI.Foldout(foldoutRect, foldoutStates[index], label)); - contentRect.x -= (arrowRect.width / 2) - Spacing; - contentRect.width += (arrowRect.width / 2) - Spacing; - if (isNewItem) + if (EditorGUI.EndChangeCheck()) { - DrawNewItem(contentRect); - } - else - { - var keyMeta = metadata.KeyMetadata(index); - var valMeta = metadata.ValueMetadata(index); - OnItemGUI(keyMeta, valMeta, contentRect, false); + parentInspector.SetHeightDirty(); } + + EditorGUIUtility.hierarchyMode = oldHierarchyMode; + return expanded; } + } - if (index == Count - 1) - return; + private void DrawExpandedContent(Rect position, int index, bool isNewItem) + { + Rect contentRect = new Rect( + position.x, + position.y + FoldoutHeight + Spacing, + position.width, + position.height - FoldoutHeight - Spacing); - var controlID = GUIUtility.GetControlID(FocusType.Passive); + if (isNewItem) + { + Rect newItemPosition = new Rect(contentRect.x, contentRect.y, contentRect.width, GetItemContentHeight(newKeyMetadata, newValueMetadata, contentRect.width)); + OnItemGUI(newKeyMetadata, newValueMetadata, newItemPosition, editableKey: true); + } + else + { + OnItemGUI(metadata.KeyMetadata(index), metadata.ValueMetadata(index), contentRect, editableKey: false); + } + } - switch (Event.current.GetTypeForControl(controlID)) + private void HandleDragAndDrop(Rect position, int index) + { + int controlID = GUIUtility.GetControlID(FocusType.Passive); + var e = Event.current; + + switch (e.GetTypeForControl(controlID)) { case EventType.MouseDown: - var draggablePosition = position; - - if (Event.current.button == (int)MouseButton.Left && draggablePosition.Contains(Event.current.mousePosition)) + if (e.button == (int)MouseButton.Left && position.Contains(e.mousePosition)) { GUIUtility.hotControl = controlID; - Event.current.Use(); + e.Use(); } - break; case EventType.MouseDrag: @@ -268,35 +193,38 @@ public override void DrawItem(Rect position, int index) { var item = this[index]; GUIUtility.hotControl = 0; + DragAndDrop.PrepareStartDrag(); - DragAndDrop.objectReferences = new UnityEngine.Object[0]; - DragAndDrop.paths = new string[0]; - DragAndDrop.SetGenericData(DraggedDictionaryItem.TypeName, new DraggedDictionaryItem(this, index, KeyValuePair.Create(metadata.KeyMetadata(index).value, item), foldoutStates[index])); + DragAndDrop.objectReferences = Array.Empty(); + DragAndDrop.paths = Array.Empty(); + + var pair = KeyValuePair.Create(metadata.KeyMetadata(index).value, item); + DragAndDrop.SetGenericData(DraggedDictionaryItem.TypeName, new DraggedDictionaryItem(this, index, pair, foldoutStates[index])); + DragAndDrop.StartDrag(metadata.path); - Event.current.Use(); + e.Use(); } - break; } } - public new event Action itemAdded; - public event Action valueChanged; - - public override void Add() + private void EnsureFoldoutStateSynced(int index) { - var newKey = newKeyMetadata.value; - var newValue = newValueMetadata.value; + if (index == Count - 1) return; - if (!CanAdd()) + while (foldoutStates.Count <= index) { - return; + foldoutStates.Add(false); + parentInspector.SetHeightDirty(); } + } - metadata.RecordUndo(); - metadata.Add(newKey, newValue); + public override void Add() + { + if (!CanAdd()) return; - itemAdded?.Invoke(newKey, newValue); + metadata.RecordUndo(); + metadata.Add(newKeyMetadata.value, newValueMetadata.value); parentInspector.SetHeightDirty(); foldoutStates.Add(true); @@ -313,7 +241,7 @@ public override void Add() return false; } - if (metadata.Contains(newKeyMetadata.value)) + if (metadata.Contains(newKey)) { EditorUtility.DisplayDialog("New Dictionary Item", "An item with the same key already exists.", "OK"); return false; @@ -322,206 +250,122 @@ public override void Add() return true; } - public override void Clear() - { - base.Clear(); - valueChanged?.Invoke(metadata.value); - } - - public override void Duplicate(int index) - { - base.Duplicate(index); - valueChanged?.Invoke(metadata.value); - } + public override void Clear() { base.Clear(); InvokeValueChanged(); } + public override void Duplicate(int index) { base.Duplicate(index); InvokeValueChanged(); } + public override void Move(int sourceIndex, int destinationIndex) { base.Move(sourceIndex, destinationIndex); InvokeValueChanged(); } + public override void Insert(int index) { base.Insert(index); InvokeValueChanged(); } - public override void Move(int sourceIndex, int destinationIndex) + public override void Remove(int index) { - base.Move(sourceIndex, destinationIndex); - valueChanged?.Invoke(metadata.value); + if (index < foldoutStates.Count) foldoutStates.RemoveAt(index); + base.Remove(index); + InvokeValueChanged(); + ClearHotControls(); } - public override void Insert(int index) - { - base.Insert(index); - valueChanged?.Invoke(metadata.value); - } + private void InvokeValueChanged() => valueChanged?.Invoke(metadata.value); - public override void Remove(int index) + private void ClearHotControls() { - if (index < foldoutStates.Count) - foldoutStates.RemoveAt(index); - base.Remove(index); - valueChanged?.Invoke(metadata.value); GUIUtility.keyboardControl = 0; GUIUtility.hotControl = 0; } - private void DrawNewItem(Rect position) + private float GetItemContentHeight(Metadata keyMetadata, Metadata valueMetadata, float width) { - var newItemPosition = new Rect - ( - position.x, - position.y, - position.width, - GetItemHeight(newKeyMetadata, newValueMetadata, position.width) - ); - - OnItemGUI(newKeyMetadata, newValueMetadata, newItemPosition, true); - } - - private float GetItemHeight(Metadata keyMetadata, Metadata valueMetadata, float width) - { - return Mathf.Max(GetKeyHeight(keyMetadata, GetKeyWidth(width)), GetValueHeight(valueMetadata, GetValueWidth(width))) + (itemPadding * 2); + float halfWidth = GetHalfWidth(width); + return Mathf.Max( + LudiqGUI.GetInspectorHeight(parentInspector, keyMetadata, halfWidth, GUIContent.none), + LudiqGUI.GetInspectorHeight(parentInspector, valueMetadata, halfWidth, GUIContent.none)) + (ItemPadding * 2); } private void OnItemGUI(Metadata keyMetadata, Metadata valueMetadata, Rect position, bool editableKey) { - var keyPosition = new Rect - ( - position.x + itemPadding, - position.y + itemPadding, - GetKeyWidth(position.width), - GetKeyHeight(keyMetadata, GetKeyWidth(position.width)) - ); - - var valuePosition = new Rect - ( - keyPosition.xMax + spaceBetweenKeyAndValue, - position.y + itemPadding, - GetValueWidth(position.width), - GetValueHeight(valueMetadata, GetValueWidth(position.width)) - ); + float halfWidth = GetHalfWidth(position.width); - EditorGUI.BeginDisabledGroup(!editableKey); - OnKeyGUI(keyMetadata, keyPosition); - EditorGUI.EndDisabledGroup(); + Rect keyPosition = new Rect( + position.x + ItemPadding, + position.y + ItemPadding, + halfWidth, + LudiqGUI.GetInspectorHeight(parentInspector, keyMetadata, halfWidth, GUIContent.none)); - OnValueGUI(valueMetadata, valuePosition); - } + Rect valuePosition = new Rect( + keyPosition.xMax + SpaceBetweenKeyAndValue, + position.y + ItemPadding, + halfWidth, + LudiqGUI.GetInspectorHeight(parentInspector, valueMetadata, halfWidth, GUIContent.none)); - private void OnKeyGUI(Metadata keyMetadata, Rect keyPosition) - { + EditorGUI.BeginDisabledGroup(!editableKey); LudiqGUI.Inspector(keyMetadata, keyPosition, GUIContent.none); - } + EditorGUI.EndDisabledGroup(); - private void OnValueGUI(Metadata valueMetadata, Rect valuePosition) - { LudiqGUI.Inspector(valueMetadata, valuePosition, GUIContent.none); } - private float GetKeyHeight(Metadata keyMetadata, float keyWidth) - { - return LudiqGUI.GetInspectorHeight(parentInspector, keyMetadata, keyWidth, GUIContent.none); - } - - private float GetValueHeight(Metadata valueMetadata, float valueWidth) - { - return LudiqGUI.GetInspectorHeight(parentInspector, valueMetadata, valueWidth, GUIContent.none); - } - - private float GetKeyWidth(float width) - { - return (width - spaceBetweenKeyAndValue) / 2; - } - - private float GetValueWidth(float width) - { - return (width - spaceBetweenKeyAndValue) / 2; - } + private float GetHalfWidth(float totalWidth) => (totalWidth - SpaceBetweenKeyAndValue) / 2; public bool CanDropInsert(int insertionIndex) { - if (insertionIndex != Count - 1) - return false; - if (!ReorderableListControl.CurrentListPosition.Contains(Event.current.mousePosition)) - { + if (insertionIndex != Count - 1 || !ReorderableListControl.CurrentListPosition.Contains(Event.current.mousePosition)) return false; - } - - var data = DragAndDrop.GetGenericData(DraggedDictionaryItem.TypeName); - - if (data is DraggedDictionaryItem draggedDictionaryItem && draggedDictionaryItem.item is KeyValuePair valuePair) - { - return !metadata.Contains(valuePair.Key) && metadata.dictionaryKeyType.IsInstanceOfType(valuePair.Key) && metadata.dictionaryValueType.IsInstanceOfType(valuePair.Value); - } - return false; + return DragAndDrop.GetGenericData(DraggedDictionaryItem.TypeName) is DraggedDictionaryItem draggedData && + draggedData.item is KeyValuePair valuePair && + !metadata.Contains(valuePair.Key) && + metadata.dictionaryKeyType.IsInstanceOfType(valuePair.Key) && + metadata.dictionaryValueType.IsInstanceOfType(valuePair.Value); } - protected virtual bool CanDrop(object item) - { - return true; - } + protected virtual bool CanDrop(object item) => true; public void ProcessDropInsertion(int insertionIndex) { if (Event.current.type == EventType.DragPerform) { - var draggedItem = (DraggedDictionaryItem)DragAndDrop.GetGenericData(DraggedDictionaryItem.TypeName); - - if (draggedItem.sourceDictionaryAdaptor != this) + if (DragAndDrop.GetGenericData(DraggedDictionaryItem.TypeName) is DraggedDictionaryItem draggedItem && + draggedItem.sourceDictionaryAdaptor != this && + CanDrop(draggedItem.item)) { - if (CanDrop(draggedItem.item)) - { - var pair = (KeyValuePair)draggedItem.item; - metadata.Add(pair.Key, pair.Value); - - draggedItem.sourceDictionaryAdaptor.Remove(draggedItem.index); - draggedItem.sourceDictionaryAdaptor.parentInspector.SetHeightDirty(); - parentInspector.SetHeightDirty(); - GUI.changed = true; - Event.current.Use(); - } + var pair = (KeyValuePair)draggedItem.item; + metadata.Add(pair.Key, pair.Value); + + draggedItem.sourceDictionaryAdaptor.Remove(draggedItem.index); + draggedItem.sourceDictionaryAdaptor.parentInspector.SetHeightDirty(); + + parentInspector.SetHeightDirty(); + GUI.changed = true; + Event.current.Use(); } } } public override float GetItemAdaptiveWidth(int index) { - EnsureFoldoutCount(index); + EnsureFoldoutStateSynced(index); bool isNewItem = index == Count - 1; bool expanded = isNewItem ? newItemExpanded : foldoutStates[index]; - const float foldoutArrowWidth = 12f; - const float padding = 10f; - - GUIContent label = isNewItem - ? new GUIContent("New Item") - : CommunityStyles.GetCollectionDisplayName(metadata.KeyMetadata(index), index, true); - - float labelWidth = GUI.skin.label.CalcSize(label).x; - - float baseWidth = foldoutArrowWidth + labelWidth + DeleteButtonWidth + padding; + GUIContent label = isNewItem ? new GUIContent("New Item") : CommunityStyles.GetCollectionDisplayName(metadata.KeyMetadata(index), index, true); + float baseWidth = FoldoutArrowWidth + GUI.skin.label.CalcSize(label).x + DeleteButtonWidth + AdaptiveWidthPadding; - float keyWidth = 0f; - float valueWidth = 0f; + float contentWidth = 0f; if (expanded) { try { - var keyInspector = metadata.KeyMetadata(index).Inspector(); - var valueInspector = metadata.ValueMetadata(index).Inspector(); - - if (keyInspector != null) - { - keyWidth = keyInspector.GetAdaptiveWidth(); - } - - if (valueInspector != null) - { - valueWidth = valueInspector.GetAdaptiveWidth(); - } + float keyWidth = metadata.KeyMetadata(index).Inspector()?.GetAdaptiveWidth() ?? 0f; + float valueWidth = metadata.ValueMetadata(index).Inspector()?.GetAdaptiveWidth() ?? 0f; + contentWidth = keyWidth + valueWidth + SpaceBetweenKeyAndValue + (ItemPadding * 2); } catch (Exception) { + } } - float contentWidth = keyWidth + valueWidth + spaceBetweenKeyAndValue + itemPadding * 2; - - return Mathf.Max(baseWidth, contentWidth + padding); + return Mathf.Max(baseWidth, contentWidth + AdaptiveWidthPadding); } } } \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Inspectors/Dictionary/DictionaryInspector.cs b/Editor/Nodes/Fundamentals/Inspectors/Dictionary/DictionaryInspector.cs index acd5eef9..1c74a430 100644 --- a/Editor/Nodes/Fundamentals/Inspectors/Dictionary/DictionaryInspector.cs +++ b/Editor/Nodes/Fundamentals/Inspectors/Dictionary/DictionaryInspector.cs @@ -22,10 +22,7 @@ protected override float GetHeight(float width, GUIContent label) protected override void OnGUI(Rect position, GUIContent label) { - var normal = GUI.backgroundColor; adaptor.Field(position, label); - // Restore color after tinting add - GUI.backgroundColor = normal; } public override float GetAdaptiveWidth() diff --git a/Editor/Nodes/Fundamentals/Inspectors/List/DraggedListItem.cs b/Editor/Nodes/Fundamentals/Inspectors/List/DraggedListItem.cs index 16d63d2a..b59f39f3 100644 --- a/Editor/Nodes/Fundamentals/Inspectors/List/DraggedListItem.cs +++ b/Editor/Nodes/Fundamentals/Inspectors/List/DraggedListItem.cs @@ -3,21 +3,14 @@ namespace Unity.VisualScripting.Community { - public class DraggedListItem : VisualScripting.DraggedListItem + internal class DraggedListItem : VisualScripting.DraggedListItem { public DraggedListItem(MetadataListAdaptor sourceListAdaptor, int index, object item, bool foldoutState) : base(sourceListAdaptor, index, item) { this.foldoutState = foldoutState; } - public DraggedListItem(MetadataListAdaptor sourceListAdaptor, int index, object item, (VariableDeclaration, VariableFoldout) variableState) : base(sourceListAdaptor, index, item) - { - this.variableState = variableState; - } - public readonly bool foldoutState; - - public readonly (VariableDeclaration, VariableFoldout) variableState; } public class DraggedDictionaryItem diff --git a/Editor/Nodes/Fundamentals/Inspectors/List/ListAdaptor.cs b/Editor/Nodes/Fundamentals/Inspectors/List/ListAdaptor.cs index 420c30d0..7a9344fa 100644 --- a/Editor/Nodes/Fundamentals/Inspectors/List/ListAdaptor.cs +++ b/Editor/Nodes/Fundamentals/Inspectors/List/ListAdaptor.cs @@ -1,244 +1,137 @@ using System; +using System.Collections; using System.Collections.Generic; -using System.Reflection; +using Unity.VisualScripting.Community.Libraries.Humility; +using Unity.VisualScripting.ReorderableList; using UnityEditor; using UnityEngine; -using Unity.VisualScripting.ReorderableList; -using Unity.VisualScripting.Community.Libraries.Humility; -using System.Collections; -using System.Linq; namespace Unity.VisualScripting.Community { public class ListAdaptor : MetadataListAdaptor, IReorderableListDropTarget { - private readonly List foldoutStates = new List(); public ReorderableListControl listControl; + private readonly List foldoutStates = new List(); + private const float FoldoutHeight = 20f; private const float FieldHeight = 18f; private const float Spacing = 4f; private const float DeleteButtonWidth = 18f; private const float DragHandleWidth = 16f; + private const float IndentWidth = 20f; + private const float ContentIndent = 22f; + private const float VerticalOffset = 4f; + private const float HoverExpandDelay = 0.35f; - private static readonly FieldInfo listControlFieldInfo = typeof(MetadataCollectionAdaptor).GetField("listControl", BindingFlags.NonPublic | BindingFlags.Instance); - - public ListAdaptor(Metadata metadata, Inspector parent) : base(metadata, parent) - { - if (listControlFieldInfo != null) - { - listControl = listControlFieldInfo.GetValue(this) as ReorderableListControl; - if (listControl != null) - { - listControl.ContainerStyle = GUIStyle.none; - listControl.Flags = ReorderableListFlags.HideRemoveButtons; - listControl.HorizontalLineColor = EditorGUIUtility.isProSkin ? Color.black : Color.white; - listControl.HorizontalLineAtStart = true; - listControl.HorizontalLineAtEnd = true; - } - } - alwaysDragAndDrop = true; - } + public ListAdaptor(Metadata metadata, Inspector parent) : base(metadata, parent) { } public override float GetItemHeight(float width, int index) { var element = metadata[index]; + EnsureFoldoutStateSynced(index); - EnsureFoldoutCount(index); - bool expanded = foldoutStates[index]; - - if (!expanded) - return FoldoutHeight + Spacing; + float totalHeight = FoldoutHeight + Spacing; - float total = FoldoutHeight + Spacing; - - total += element.Inspector().GetCachedHeight(width - 20, GUIContent.none, parentInspector) + 2f; + if (foldoutStates[index]) + { + totalHeight += element.Inspector().GetCachedHeight(width - IndentWidth, GUIContent.none, parentInspector) + 2f; + totalHeight += 4f; + } - return total + 4f; + return totalHeight; } protected override IList ConstructList() { - if (metadata.listType == typeof(IList)) return new AotList(); - else if (metadata.listType.IsGenericType && metadata.listType.GetGenericTypeDefinition() == typeof(IList<>)) + if (metadata.listType == typeof(IList)) + return new AotList(); + + if (metadata.listType.IsGenericType && metadata.listType.GetGenericTypeDefinition() == typeof(IList<>)) { var args = metadata.listType.GetGenericArguments(); return (IList)Activator.CreateInstance(typeof(List<>).MakeGenericType(args[0])); } - return base.ConstructList(); - } - -#if DARKER_UI - // I have to do this setup to change the color of the add button - // It's very hacky but seems to work better than tinting the background Texture. - private Color _previousBackgroundColor; - private bool _tintApplied; - - public override void BeginGUI() - { - if (_tintApplied) - { - GUI.backgroundColor = _previousBackgroundColor; - _tintApplied = false; - } - } - - public override void EndGUI() - { - _previousBackgroundColor = GUI.backgroundColor; - GUI.backgroundColor = CommunityStyles.backgroundColor.Brighten(0.36f); - _tintApplied = true; - } -#endif - private void EnsureFoldoutCount(int index) - { - while (foldoutStates.Count <= index) - { - foldoutStates.Add(false); - foldoutHoverStartTimes.Add(null); - parentInspector.SetHeightDirty(); - } + return base.ConstructList(); } - public override void DrawItemBackground(Rect position, int index) - { -#if DARKER_UI - EditorGUI.DrawRect(position, CommunityStyles.backgroundColor); -#else - EditorGUI.DrawRect(position, ColorPalette.unityBackgroundLight); -#endif - var restoredColor = Handles.color; - Handles.color = Color.gray * 0.6f; - Handles.DrawAAPolyLine(2f, new Vector3[] - { - new Vector3(position.x, position.y + 1), - new Vector3(position.xMax, position.y + 1), - new Vector3(position.xMax, position.yMax), - new Vector3(position.x, position.yMax), - new Vector3(position.x, position.y) - }); - Handles.color = restoredColor; - } - private List foldoutHoverStartTimes = new List(); public override void DrawItem(Rect position, int index) { - if (!foldoutHoverStartTimes.Contains(index)) foldoutHoverStartTimes.Add(null); - - position.x -= 20; - position.width += 20; - var element = metadata[index]; - - var oldHandleRect = new Rect(position.x + 4, position.y + position.height / 2f - 3, 9, 7); -#if DARKER_UI - EditorGUI.DrawRect(oldHandleRect, CommunityStyles.backgroundColor); -#else - EditorGUI.DrawRect(oldHandleRect, ColorPalette.unityBackgroundLight); -#endif - EnsureFoldoutCount(index); - bool expanded = foldoutStates[index]; - - float y = position.y + 4; - - Rect boxRect = new Rect(position.x, y, position.width, GetItemHeight(index)); - float lineY = boxRect.y + (FoldoutHeight - 16f) / 2f; - - const float handleSize = 12f; - Rect handleRect = new Rect(position.x + 3, lineY, handleSize, handleSize); - - Texture2D dragTexture = CommunityStyles.DragHandleTexture; + EnsureFoldoutStateSynced(index); - GUI.DrawTexture(handleRect, dragTexture); + position.x -= IndentWidth; + position.width += IndentWidth; - EditorGUIUtility.AddCursorRect(handleRect, MouseCursor.Pan); - - Rect foldoutRect = new Rect(position.x + 18, lineY, position.width - DragHandleWidth - DeleteButtonWidth - 23, FieldHeight); + var element = metadata[index]; + float yPos = position.y + VerticalOffset; - Texture2D arrowOpen = CommunityStyles.ArrowDownTexture; - Texture2D arrowClosed = CommunityStyles.ArrowRightTexture; + Rect foldoutRect = new Rect( + position.x + FieldHeight, + yPos, + position.width - DragHandleWidth - DeleteButtonWidth - 23f, + FieldHeight); - Texture2D arrowTexture = foldoutStates[index] ? arrowOpen : arrowClosed; - var arrowRect = new Rect(foldoutRect) - { - width = 12f, - height = 12f, - y = foldoutRect.y + 1 - }; + DrawFoldout(foldoutRect, index, element); + // HandleHoverExpansion(index); - if (arrowTexture != null) + if (foldoutStates[index]) { - GUI.DrawTexture(arrowRect, arrowTexture, ScaleMode.ScaleToFit, true); + DrawExpandedContent(position, yPos, index, element); } - var labelRect = new Rect(foldoutRect); - labelRect.x += 15; - labelRect.y -= 3; - GUI.Label(labelRect, CommunityStyles.GetCollectionDisplayName(element, index)); + HandleDragAndDrop(position, index); + } - if (Event.current.type == EventType.MouseDown && arrowRect.Contains(Event.current.mousePosition)) + private void DrawFoldout(Rect foldoutRect, int index, Metadata element) + { + using (new EditorGUIUtility.IconSizeScope(new Vector2(IconSize.Small, IconSize.Small))) { - foldoutStates[index] = !foldoutStates[index]; - parentInspector.SetHeightDirty(); - Event.current.Use(); - } + var oldHierarchyMode = EditorGUIUtility.hierarchyMode; + EditorGUIUtility.hierarchyMode = false; + EditorGUI.BeginChangeCheck(); - var e = Event.current; - - bool draggingObjects = (DragAndDrop.objectReferences != null && DragAndDrop.objectReferences.Length > 0) || - DragAndDrop.GetGenericData(VisualScripting.DraggedListItem.TypeName) != null || - DragAndDrop.GetGenericData(DraggedDictionaryItem.TypeName) != null; - - if (e != null && draggingObjects && e.type == EventType.MouseDrag && e.button == (int)MouseButton.Left && boxRect.Contains(e.mousePosition)) - { - const float expandDelay = 0.35f; - if (!foldoutHoverStartTimes[index].HasValue) - foldoutHoverStartTimes[index] = EditorApplication.timeSinceStartup; + foldoutStates[index] = EditorGUI.Foldout(foldoutRect, foldoutStates[index], CommunityStyles.GetCollectionDisplayName(element, index)); - if (EditorApplication.timeSinceStartup - foldoutHoverStartTimes[index].Value > expandDelay) - foldoutStates[index] = true; + if (EditorGUI.EndChangeCheck()) + { + parentInspector.SetHeightDirty(); + } - parentInspector.SetHeightDirty(); - GUI.changed = true; - } - else - { - foldoutHoverStartTimes[index] = null; + EditorGUIUtility.hierarchyMode = oldHierarchyMode; } + } - Rect deleteRect = new Rect(position.x + position.width - DeleteButtonWidth - 4, lineY - 2f, DeleteButtonWidth - 2, FieldHeight - 2); - if (GUI.Button(deleteRect, "", new GUIStyle(EditorStyles.whiteLabel) - { - normal = { background = CommunityStyles.RemoveItemTexture } - })) - { - if (CanRemove(index)) - Remove(index); - return; - } + private void DrawExpandedContent(Rect position, float yPos, int index, Metadata element) + { + float contentY = yPos + FoldoutHeight + Spacing; + float contentWidth = position.width - ContentIndent; - if (expanded) - { - float contentY = y + FoldoutHeight + Spacing; - float width = position.width - 12; - element.Inspector().Draw(new Rect(position.x + 5, contentY, width, LudiqGUI.GetInspectorHeight(parentInspector, element, width, GUIContent.none)), GUIContent.none); - } + Rect contentRect = new Rect( + position.x + ContentIndent, + contentY, + contentWidth, + LudiqGUI.GetInspectorHeight(parentInspector, element, contentWidth, GUIContent.none)); - var controlID = GUIUtility.GetControlID(FocusType.Passive); + element.Inspector().Draw(contentRect, GUIContent.none); + } + + private void HandleDragAndDrop(Rect position, int index) + { + int controlID = GUIUtility.GetControlID(FocusType.Passive); + var e = Event.current; - switch (Event.current.GetTypeForControl(controlID)) + switch (e.GetTypeForControl(controlID)) { case EventType.MouseDown: - var draggablePosition = position; - - if (Event.current.button == (int)MouseButton.Left && draggablePosition.Contains(Event.current.mousePosition) && !handleRect.Contains(Event.current.mousePosition)) + if (e.button == (int)MouseButton.Left && position.Contains(e.mousePosition)) { - if (alwaysDragAndDrop || Event.current.alt) + if (alwaysDragAndDrop || e.alt) { GUIUtility.hotControl = controlID; - Event.current.Use(); + e.Use(); } } - break; case EventType.MouseDrag: @@ -246,22 +139,32 @@ public override void DrawItem(Rect position, int index) { var item = this[index]; GUIUtility.hotControl = 0; + DragAndDrop.PrepareStartDrag(); - DragAndDrop.objectReferences = new UnityEngine.Object[0]; - DragAndDrop.paths = new string[0]; - DragAndDrop.SetGenericData(VisualScripting.DraggedListItem.TypeName, new DraggedListItem(this, index, item, foldoutStates[index])); + DragAndDrop.objectReferences = Array.Empty(); + DragAndDrop.paths = Array.Empty(); + DragAndDrop.SetGenericData(DraggedListItem.TypeName, new DraggedListItem(this, index, item, foldoutStates[index])); DragAndDrop.StartDrag(metadata.path); - Event.current.Use(); + e.Use(); } - break; } } + private void EnsureFoldoutStateSynced(int index) + { + while (foldoutStates.Count <= index) + { + foldoutStates.Add(false); + parentInspector.SetHeightDirty(); + } + } + protected override bool CanAdd() { if (metadata.HasAttribute()) return metadata.Count < metadata.GetAttribute().max; + return true; } @@ -269,15 +172,8 @@ public override bool CanRemove(int index) { if (metadata.HasAttribute()) return metadata.Count > metadata.GetAttribute().min; - return base.CanRemove(index); - } - public override void Remove(int index) - { - foldoutStates.RemoveAt(index); - base.Remove(index); - GUIUtility.keyboardControl = 0; - GUIUtility.hotControl = 0; + return base.CanRemove(index); } public override void Add() @@ -286,17 +182,37 @@ public override void Add() base.Add(); } + public override void Clear() + { + metadata.RecordUndo(); + + for (int i = 0; i < metadata.Count; i++) + { + Remove(i); + } + + parentInspector.SetHeightDirty(); + } + + public override void Remove(int index) + { + if (!CanRemove(index)) + return; + + foldoutStates.RemoveAt(index); + base.Remove(index); + ClearHotControls(); + } + public override void Move(int sourceIndex, int destIndex) { base.Move(sourceIndex, destIndex); - if (foldoutStates.Count == 0) - return; + if (foldoutStates.Count == 0) return; - if (destIndex > sourceIndex) - destIndex--; + if (destIndex > sourceIndex) destIndex--; - var state = foldoutStates[sourceIndex]; + bool state = foldoutStates[sourceIndex]; foldoutStates.RemoveAt(sourceIndex); foldoutStates.Insert(destIndex, state); } @@ -304,30 +220,21 @@ public override void Move(int sourceIndex, int destIndex) public new bool CanDropInsert(int insertionIndex) { if (!ReorderableListControl.CurrentListPosition.Contains(Event.current.mousePosition)) - { return false; - } - var data = DragAndDrop.GetGenericData(VisualScripting.DraggedListItem.TypeName); - - return data is DraggedListItem && metadata.listElementType.IsInstanceOfType(((DraggedListItem)data).item); + return DragAndDrop.GetGenericData(DraggedListItem.TypeName) is DraggedListItem draggedData && + metadata.listElementType.IsInstanceOfType(draggedData.item); } public new void ProcessDropInsertion(int insertionIndex) { if (Event.current.type == EventType.DragPerform) { - var draggedItem = DragAndDrop.GetGenericData(VisualScripting.DraggedListItem.TypeName) as DraggedListItem; - - if (draggedItem != null) + if (DragAndDrop.GetGenericData(DraggedListItem.TypeName) is DraggedListItem draggedItem) { - if (draggedItem.sourceListAdaptor != this) + if (draggedItem.sourceListAdaptor != this && CanDrop(draggedItem.item)) { - if (!CanDrop(draggedItem.item)) - return; - - var state = draggedItem.foldoutState; - foldoutStates.Insert(insertionIndex, state); + foldoutStates.Insert(insertionIndex, draggedItem.foldoutState); } } } @@ -338,16 +245,12 @@ public override void Move(int sourceIndex, int destIndex) public override float GetItemAdaptiveWidth(int index) { var element = metadata[index]; - EnsureFoldoutCount(index); - - const float foldoutArrowWidth = 12f; + EnsureFoldoutStateSynced(index); GUIContent label = CommunityStyles.GetCollectionDisplayName(element, index); - float labelWidth = GUI.skin.label.CalcSize(label).x; - - float baseWidth = DragHandleWidth + foldoutArrowWidth + labelWidth + DeleteButtonWidth; - + float baseWidth = GUI.skin.label.CalcSize(label).x; float inspectorWidth = 0f; + if (foldoutStates[index]) { try @@ -355,8 +258,7 @@ public override float GetItemAdaptiveWidth(int index) var inspector = element.Inspector(); if (inspector != null) { - float contentWidth = inspector.GetAdaptiveWidth(); - inspectorWidth = contentWidth + 10f; + inspectorWidth = inspector.GetAdaptiveWidth() + 10f; } } catch (Exception) @@ -366,5 +268,11 @@ public override float GetItemAdaptiveWidth(int index) return Mathf.Max(baseWidth, inspectorWidth); } + + private void ClearHotControls() + { + GUIUtility.keyboardControl = 0; + GUIUtility.hotControl = 0; + } } } \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Inspectors/List/ListInspector.cs b/Editor/Nodes/Fundamentals/Inspectors/List/ListInspector.cs index 8f1a4166..bb8c66a5 100644 --- a/Editor/Nodes/Fundamentals/Inspectors/List/ListInspector.cs +++ b/Editor/Nodes/Fundamentals/Inspectors/List/ListInspector.cs @@ -38,10 +38,7 @@ protected override void OnGUI(Rect position, GUIContent label) return; } - var normal = GUI.backgroundColor; adaptor.Field(position, label); - // Restore color after tinting add - GUI.backgroundColor = normal; } public override float GetAdaptiveWidth() => adaptor.GetAdaptiveWidth(); diff --git a/Editor/Nodes/Fundamentals/Inspectors/Variables/GraphInspectorSession.cs b/Editor/Nodes/Fundamentals/Inspectors/Variables/GraphInspectorSession.cs index 89594fe0..b67d3794 100644 --- a/Editor/Nodes/Fundamentals/Inspectors/Variables/GraphInspectorSession.cs +++ b/Editor/Nodes/Fundamentals/Inspectors/Variables/GraphInspectorSession.cs @@ -28,6 +28,16 @@ public static bool Load(UnityEngine.Object rootObject, Guid[] parentGuids, strin return state; } + public static void Delete(UnityEngine.Object rootObject, Guid[] parentGuids, string variableName) + { + if (rootObject == null) + return; + + var key = BuildInspectorKey(rootObject, parentGuids); + + SessionState.EraseBool($"{key}.{variableName}"); + } + private static string BuildInspectorKey(UnityEngine.Object rootObject, Guid[] parentGuids) { var globalId = GlobalObjectId.GetGlobalObjectIdSlow(rootObject); diff --git a/Editor/Nodes/Fundamentals/Inspectors/Variables/PatchedVariableDeclerationInspector.cs b/Editor/Nodes/Fundamentals/Inspectors/Variables/PatchedVariableDeclerationInspector.cs index 4f621dfe..77d48efb 100644 --- a/Editor/Nodes/Fundamentals/Inspectors/Variables/PatchedVariableDeclerationInspector.cs +++ b/Editor/Nodes/Fundamentals/Inspectors/Variables/PatchedVariableDeclerationInspector.cs @@ -1,16 +1,527 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using Unity.VisualScripting.ReorderableList; using UnityEditor; using UnityEngine; using UnityEngine.SceneManagement; namespace Unity.VisualScripting.Community { +#if NEW_VARIABLES_UI public sealed class PatchedVariableDeclarationInspector : Inspector { + private static readonly GUIContent Rename = new GUIContent("Rename"); + private static readonly GUIContent CommandMoveToTop = new GUIContent("Move to Top"); + private static readonly GUIContent CommandMoveToBottom = new GUIContent("Move to Bottom"); + private static readonly GUIContent CommandDuplicate = new GUIContent("Duplicate"); + private static readonly GUIContent CommandRemove = new GUIContent("Remove"); + private static readonly GUIContent CommandClearAll = new GUIContent("Clear All"); + + private static readonly FieldInfo s_ContextCommandNameFieldInfo; + private readonly Metadata nameMetadata; + private readonly Metadata valueMetadata; + private readonly Metadata typeMetadata; + + private Type cachedType; + private Texture cachedIcon; + private InlineTypeInfo cachedInlineInfo; + private bool cachedIsInline; + private SerializableType cachedTypeHandle; + private bool isOpen; + private bool hasCachedType; + private bool initializedType; + private bool changed; + private bool isRenaming; + private string renameControl; + + private SystemObjectInspector systemObjectInspector; + private Inspector valueInspector; + private Inspector typedValueInspector; + + public readonly static EditorTexture NullIcon = typeof(Null).Icon(); + private static readonly GUIContent Temp = new GUIContent(); + private const int IconSize = 16; + private const int InlineValueSpacing = 4; + private const string TextControl = "VariableDeclerationsControl"; + + private static readonly Assembly EditorCoreAssembly; + private static readonly MethodInfo ResolveSerializableTypeMethod; + private static readonly FieldInfo SystemObjectInspectorField; + private static readonly MethodInfo GetWidthMethod; + private static readonly FieldInfo ParentInspectorField; + + PatchedVariableDeclarationsInspector parent; + + private static readonly HashSet ConstructTypes = new HashSet() + { + typeof(Vector2), typeof(Vector3), typeof(Vector4), typeof(Vector2Int), typeof(Vector3Int), + typeof(Quaternion), typeof(Rect), typeof(Color), typeof(HDRColor), typeof(Gradient), + }; + + static PatchedVariableDeclarationInspector() + { + EditorCoreAssembly = typeof(GraphGUI).Assembly; + ResolveSerializableTypeMethod = EditorCoreAssembly.GetTypes().FirstOrDefault(t => t.Name == "SerializableTypeExtensions")?.GetMethod("Resolve", BindingFlags.Static | BindingFlags.Public); + SystemObjectInspectorField = typeof(SystemObjectInspector).GetField("inspector", BindingFlags.Instance | BindingFlags.NonPublic); + GetWidthMethod = EditorCoreAssembly.GetTypes().FirstOrDefault(t => t.Name == "ValueInspector")?.GetMethod("GetWidth", BindingFlags.Instance | BindingFlags.Public); + ParentInspectorField = typeof(Inspector).GetField("parentInspector", BindingFlags.NonPublic | BindingFlags.Instance); + + s_ContextCommandNameFieldInfo = typeof(ReorderableListControl).GetField("s_ContextCommandName", BindingFlags.Static | BindingFlags.NonPublic); + } + + public PatchedVariableDeclarationInspector(Metadata metadata) : base(metadata) + { + VSUsageUtility.isVisualScriptingUsed = true; + nameMetadata = metadata[nameof(VariableDeclaration.name)]; + valueMetadata = metadata[nameof(VariableDeclaration.value)]; + typeMetadata = metadata[nameof(VariableDeclaration.typeHandle)]; + } + + GraphReference reference = null; + UnityEngine.Object root = null; + Guid[] parentGuids = null; + + public override void Initialize() + { + base.Initialize(); + + valueInspector = valueMetadata.Inspector(); + + if (valueInspector is SystemObjectInspector sysObjInspector) + { + systemObjectInspector = sysObjInspector; + } + + RefreshCachedTypeInfo(); + } + + private void RefreshCachedTypeInfo() + { + var declaration = (VariableDeclaration)metadata.value; + + if (hasCachedType && cachedTypeHandle == declaration.typeHandle) return; + + hasCachedType = true; + cachedTypeHandle = declaration.typeHandle; + cachedType = (Type)ResolveSerializableTypeMethod.InvokeOptimized(null, cachedTypeHandle); + + EditorTexture icon = (cachedType == null || cachedType == typeof(Unknown)) ? NullIcon : cachedType.Icon(); + cachedIcon = icon[IconSize]; + + cachedInlineInfo = new InlineTypeInfo(cachedType); + cachedIsInline = cachedType != null && (cachedType.IsBasic() || cachedInlineInfo.isConstruct || cachedInlineInfo.isUnityObject); + + typedValueInspector = valueMetadata.Cast(cachedType).Inspector(); + } + + protected override float GetHeight(float width, GUIContent label) + { + float height = 0f; + + using (LudiqGUIUtility.labelWidth.Override(Styles.labelWidth)) + { + height += Styles.padding + GetNameHeight(width); + + if (isOpen) + { + height += Styles.spacing + GetTypeHeight(width); + height += Styles.spacing + GetValueHeight(width); + } + + height += Styles.padding; + } + + return height; + } + + private float GetNameHeight(float width) => EditorGUIUtility.singleLineHeight; + private float GetValueHeight(float width) => LudiqGUI.GetInspectorHeight(this, valueMetadata, width); + private float GetTypeHeight(float width) => LudiqGUI.GetInspectorHeight(this, typeMetadata, width); + + private bool LoadedState; + + private void LoadState() + { + if (LoadedState) return; + + LoadedState = true; + + parent = ParentInspectorField.GetValueOptimized(this) as PatchedVariableDeclarationsInspector; + + var declaration = metadata.value as VariableDeclaration; + + if (VariablesWindow.isVariablesWindowContext) + { + reference = VariablesWindow.currentContext?.reference; + root = reference?.rootObject; + parentGuids = reference?.parentElementGuids?.ToArray(); + } + else + { + reference = LudiqGraphsEditorUtility.editedContext?.value?.reference; + root = reference?.rootObject; + parentGuids = reference?.parentElementGuids?.ToArray(); + } + + var ancestor = metadata.Ancestor(m => m.value is Variables); + if (ancestor != null) + { + root = ancestor.value as Variables; + parentGuids = null; + } + + if (parent.kind == VariableKind.Application) + { + root = ApplicationVariables.asset; + parentGuids = null; + } + else if (parent.kind == VariableKind.Saved) + { + root = SavedVariables.asset; + parentGuids = null; + } + + isOpen = VariableInspectorState.Load(root, parentGuids, declaration.name); + } + + protected override void OnGUI(Rect position, GUIContent label) + { + LoadState(); + + if (e.type == EventType.ContextClick && position.Contains(e.mousePosition)) + { + var menu = new GenericMenu(); + AddItemsToMenu(menu, metadata.parent.IndexOf(metadata.value)); + menu.ShowAsContext(); + e.Use(); + } + + position = BeginLabeledBlock(metadata, position, label); + RefreshCachedTypeInfo(); + + using (LudiqGUIUtility.labelWidth.Override(Styles.labelWidth)) + { + y += Styles.padding; + var namePosition = position.VerticalSection(ref y, GetNameHeight(position.width)); + + if (!initializedType && systemObjectInspector != null) + { + GetWidthMethod.InvokeOptimized(SystemObjectInspectorField.GetValueOptimized(systemObjectInspector)); + initializedType = true; + } + + OnNameGUI(namePosition); + + if (isOpen) + { + y += Styles.spacing; + var typePosition = position.VerticalSection(ref y, GetTypeHeight(position.width)); + + y += Styles.spacing; + var valuePosition = position.VerticalSection(ref y, GetValueHeight(position.width)); + + LudiqGUI.Inspector(typeMetadata, typePosition, GUIContent.none); + LudiqGUI.Inspector(valueMetadata, valuePosition, GUIContent.none); + } + + y += Styles.padding; + } + + if (!changed) EndBlock(metadata); + } + + public void OnNameGUI(Rect namePosition) + { + var declaration = (VariableDeclaration)metadata.value; + + var foldoutRect = new Rect(namePosition.x, namePosition.y, 16, namePosition.height); + var textRect = new Rect(foldoutRect.xMax + IconSize, namePosition.y, namePosition.width - foldoutRect.width - IconSize, namePosition.height); + var valueRect = Rect.zero; + + var oldMode = EditorGUIUtility.hierarchyMode; + EditorGUIUtility.hierarchyMode = false; + Temp.image = cachedIcon; + + var oldIsOpen = isOpen; + isOpen = EditorGUI.Foldout(foldoutRect, isOpen, Temp, true); + + if (oldIsOpen != isOpen) + VariableInspectorState.Save(root, parentGuids, declaration.name, isOpen); + + EditorGUIUtility.hierarchyMode = oldMode; + + bool drawInlineValue = !isOpen && cachedIsInline; + if (drawInlineValue) + { + if (cachedInlineInfo.isEnum) + { + if (typedValueInspector is EnumInspector enumInspector) + { + var adaptiveWidth = enumInspector.GetAdaptiveWidth(); + textRect.width -= adaptiveWidth; + + valueRect = new Rect(textRect.xMax + InlineValueSpacing, textRect.y, adaptiveWidth, textRect.height); + } + else + { + textRect.width -= cachedInlineInfo.width + InlineValueSpacing; + valueRect = new Rect(textRect.xMax + InlineValueSpacing, textRect.y, cachedInlineInfo.width, textRect.height); + } + } + else + { + textRect.width -= cachedInlineInfo.width + InlineValueSpacing; + valueRect = new Rect(textRect.xMax + InlineValueSpacing, textRect.y, cachedInlineInfo.width, textRect.height); + } + } + + var oldName = (string)nameMetadata.value; + string controlName = TextControl + oldName; + GUI.SetNextControlName(controlName); + + BeginBlock(nameMetadata, namePosition); + string newName = EditorGUI.DelayedTextField(textRect, oldName); + + if (renameControl != null && renameControl == controlName) + { + GUI.FocusControl(controlName); + renameControl = null; + } + + bool endBlock = EndBlock(nameMetadata); + + if (drawInlineValue) + { + if (cachedInlineInfo.isUnityObject) + { + EditorGUI.BeginChangeCheck(); + var updatedObj = EditorGUI.ObjectField(valueRect, valueMetadata.value as UnityEngine.Object, cachedType, true); + if (EditorGUI.EndChangeCheck()) + { + valueMetadata.RecordUndo(); + valueMetadata.value = updatedObj; + } + } + else + { + valueInspector.Draw(valueRect, GUIContent.none); + } + } + + if (endBlock && ProcessRename(oldName, newName, declaration, parent?.kind)) + { + GUI.FocusControl(null); + } + + if (parent != null && parent.addedItem && declaration == parent.addedDeclaration) + { + parent.addedItem = false; + parent.addedDeclaration = null; + GUI.FocusControl(controlName); + } + } + + private bool ProcessRename(string oldName, string newName, VariableDeclaration declaration, VariableKind? kind) + { + var variableDeclarations = (VariableDeclarationCollection)metadata.parent.value; + + if (StringUtility.IsNullOrWhiteSpace(newName)) + { + EditorUtility.DisplayDialog("Edit Variable Name", "Please enter a variable name.", "OK"); + return false; + } + if (variableDeclarations.Contains(newName) && newName != oldName) + { + EditorUtility.DisplayDialog("Edit Variable Name", "A variable with the same name already exists.", "OK"); + return false; + } + if (oldName == newName) return false; + + nameMetadata.RecordUndo(); + RecordSceneUndo(kind); + + variableDeclarations.EditorRename(declaration, newName); + nameMetadata.value = newName; + + UpdateVariableReferences(kind, oldName, newName); + + if (isRenaming) + { + GraphUtility.RenameVariables(parent.kind.Value, oldName, newName, metadata); + } + return true; + } + + private void RecordSceneUndo(VariableKind? kind) + { + if (kind != VariableKind.Scene) return; + + if (GraphWindow.active != null && GraphWindow.activeReference?.scene != null) + { + Undo.RecordObject(SceneVariables.Instance(GraphWindow.activeReference.scene.Value).variables, "Changed Scene variable name"); + return; + } + + for (int i = 0; i < SceneManager.sceneCount; i++) + { + var scene = SceneManager.GetSceneAt(i); + if (scene.isLoaded && VisualScripting.Variables.Scene(scene) == metadata.parent.value) + { + Undo.RecordObject(SceneVariables.Instance(scene).variables, "Changed Scene variable name"); + break; + } + } + } + + private void UpdateVariableReferences(VariableKind? kind, string oldName, string newName) + { + switch (kind) + { + case VariableKind.Flow: + case VariableKind.Graph: + if (EditorWindow.focusedWindow == GraphWindow.active) + GraphUtility.UpdateAllGraphVariables((FlowGraph)GraphWindow.activeContext.graph, oldName, newName); + else if (VariablesWindow.isVariablesWindowContext && VariablesWindow.currentContext != null) + GraphUtility.UpdateAllGraphVariables((FlowGraph)VariablesWindow.currentContext.graph, oldName, newName); + break; + + case VariableKind.Object: + var objAncestor = metadata.Ancestor(m => m.value is VisualScripting.Variables); + if (objAncestor?.value != null) + GraphUtility.UpdateAllObjectVariables((objAncestor.value as VisualScripting.Variables).gameObject, oldName, newName); + else if (EditorWindow.focusedWindow == GraphWindow.active && GraphWindow.activeReference?.gameObject != null) + GraphUtility.UpdateAllObjectVariables(GraphWindow.activeReference.gameObject, oldName, newName); + break; + + case VariableKind.Scene: + var sceneAncestor = metadata.Ancestor(m => m.value is VisualScripting.Variables); + if (sceneAncestor?.value != null) + GraphUtility.UpdateAllSceneVariables((sceneAncestor.value as VisualScripting.Variables).gameObject.scene, oldName, newName); + else if (EditorWindow.focusedWindow == GraphWindow.active && GraphWindow.activeReference?.scene != null) + GraphUtility.UpdateAllSceneVariables(GraphWindow.activeReference.scene.Value, oldName, newName); + else + Debug.LogWarning("[Rename Variables] Could not find valid scene to update variables."); + break; + + case VariableKind.Application: + case VariableKind.Saved: + if (Application.isPlaying) + { + Debug.LogWarning($"[Rename Variables] Cannot rename {kind} variables while in play mode!"); + break; + } + bool choice = changed = EditorUtility.DisplayDialog( + $"Update ALL {kind} Variables?", + $"This will go through ALL scenes and macros to find every Variable Unit using '{oldName}' and update it to '{newName}'.\n\nThis operation is FINAL and cannot be undone!", + "Update All", "Rename Only"); + + if (choice && kind == VariableKind.Application) GraphUtility.RenameApplicationVariables(oldName, newName); + else if (choice && kind == VariableKind.Saved) GraphUtility.RenameSavedVariables(oldName, newName); + break; + } + } + + private void DoCommand(GUIContent command, int itemIndex) + { + if (command == Rename) + { + isRenaming = true; + renameControl = TextControl + (metadata.parent[itemIndex].value as VariableDeclaration).name; + return; + } + s_ContextCommandNameFieldInfo.SetValueOptimized(null, command.text); + parent.listControl.DoCommand(command.text, itemIndex, (IReorderableListAdaptor)PatchedVariableDeclarationsInspector.adaptorFieldAccessor.GetValue(parent)); + } + + private void AddItemsToMenu(GenericMenu menu, int itemIndex) + { + void Action(object v) => DoCommand(v as GUIContent, itemIndex); + + menu.AddItem(Rename, false, Action, Rename); + menu.AddSeparator(""); + + if (itemIndex > 0) menu.AddItem(CommandMoveToTop, false, Action, CommandMoveToTop); + else menu.AddDisabledItem(CommandMoveToTop); + + if (itemIndex + 1 < metadata.parent.Count) menu.AddItem(CommandMoveToBottom, false, Action, CommandMoveToBottom); + else menu.AddDisabledItem(CommandMoveToBottom); + + menu.AddSeparator(""); + menu.AddItem(CommandDuplicate, false, Action, CommandDuplicate); + + if (menu.GetItemCount() > 0) menu.AddSeparator(""); + + menu.AddItem(CommandRemove, false, Action, CommandRemove); + menu.AddSeparator(""); + menu.AddItem(CommandClearAll, false, Action, CommandClearAll); + } + + private readonly struct InlineTypeInfo + { + public readonly bool isUnityObject; + public readonly bool isConstruct; + public readonly bool isEnum; + public readonly float width; + + public InlineTypeInfo(Type type) + { + isUnityObject = type != null && typeof(UnityEngine.Object).IsAssignableFrom(type); + isConstruct = type != null && ConstructTypes.Contains(type); + isEnum = type != null && type.IsEnum; + + if (isUnityObject || type == typeof(bool)) width = 20f; + else if (isEnum) width = 65f; + else if (type == typeof(Vector2) || type == typeof(Vector2Int) || type == typeof(Color) || type == typeof(HDRColor) || type == typeof(Gradient)) width = 50f; + else if (type == typeof(Vector3) || type == typeof(Vector3Int)) width = 65f; + else if (type == typeof(Vector4)) width = 80f; + else width = 35f; + } + } + + public static class Styles + { + public static readonly float labelWidth = SystemObjectInspector.Styles.labelWidth; + public static readonly float padding = 2; + public static readonly float spacing = EditorGUIUtility.standardVerticalSpacing; + } + } +#else + public sealed class PatchedVariableDeclarationInspector : Inspector + { + private static readonly FieldInfo s_ContextCommandNameFieldInfo; + private static readonly FieldInfo AdaptorField = typeof(VariableDeclarationsInspector).GetField("adaptor", BindingFlags.Instance | BindingFlags.NonPublic); + private static readonly FieldInfo listControlFieldInfo = typeof(MetadataCollectionAdaptor).GetField("listControl", BindingFlags.NonPublic | BindingFlags.Instance); + + private static readonly GUIContent Rename = new GUIContent("Rename"); + private static readonly GUIContent CommandMoveToTop = new GUIContent("Move to Top"); + private static readonly GUIContent CommandMoveToBottom = new GUIContent("Move to Bottom"); + private static readonly GUIContent CommandDuplicate = new GUIContent("Duplicate"); + private static readonly GUIContent CommandRemove = new GUIContent("Remove"); + private static readonly GUIContent CommandClearAll = new GUIContent("Clear All"); + + private MetadataListAdaptor adaptor; + private ReorderableListControl listControl; + + private const string TextControl = "VariableDeclerationsControl"; + private string renameControl; + private bool isRenaming; + private Metadata nameMetadata => metadata[nameof(VariableDeclaration.name)]; private Metadata valueMetadata => metadata[nameof(VariableDeclaration.value)]; #if VISUAL_SCRIPTING_1_7 private Metadata typeMetadata => metadata[nameof(VariableDeclaration.typeHandle)]; #endif + private bool changed; + private VariableDeclarationsInspector parent; + private static readonly FieldInfo ParentInspectorField = typeof(Inspector).GetField("parentInspector", BindingFlags.NonPublic | BindingFlags.Instance); + + static PatchedVariableDeclarationInspector() + { + s_ContextCommandNameFieldInfo = typeof(ReorderableListControl).GetField("s_ContextCommandName", BindingFlags.Static | BindingFlags.NonPublic); + } + public PatchedVariableDeclarationInspector(Metadata metadata) : base(metadata) { @@ -54,8 +565,41 @@ float GetTypeHeight(float width) return LudiqGUI.GetInspectorHeight(this, typeMetadata, width); } #endif + + private bool LoadedState; + + private bool addedItem; + + private void LoadState() + { + if (LoadedState) return; + + LoadedState = true; + + parent = ParentInspectorField.GetValueOptimized(this) as VariableDeclarationsInspector; + + adaptor = (MetadataListAdaptor)AdaptorField.GetValueOptimized(parent); + + listControl = (ReorderableListControl)listControlFieldInfo.GetValueOptimized(adaptor); + + adaptor.itemAdded += (v) => + { + addedItem = metadata.value == v; + }; + } + protected override void OnGUI(Rect position, GUIContent label) { + LoadState(); + + if (e.type == EventType.ContextClick && position.Contains(e.mousePosition)) + { + var menu = new GenericMenu(); + AddItemsToMenu(menu, metadata.parent.IndexOf(metadata.value)); + menu.ShowAsContext(); + e.Use(); + } + position = BeginLabeledBlock(metadata, position, label); using (LudiqGUIUtility.labelWidth.Override(Styles.labelWidth)) @@ -77,179 +621,173 @@ protected override void OnGUI(Rect position, GUIContent label) OnValueGUI(valuePosition); } - if (!changed) - EndBlock(metadata); + if (!changed) EndBlock(metadata); } - private bool changed; - public void OnNameGUI(Rect namePosition) { - namePosition = BeginLabeledBlock(nameMetadata, namePosition); + var declaration = (VariableDeclaration)metadata.value; var oldName = (string)nameMetadata.value; - var newName = EditorGUI.DelayedTextField(namePosition, (string)nameMetadata.value); + string controlName = TextControl + oldName; - if (EndBlock(nameMetadata)) + namePosition = BeginLabeledBlock(nameMetadata, namePosition); + + GUI.SetNextControlName(controlName); + + var newName = EditorGUI.DelayedTextField(namePosition, oldName); + + if (renameControl != null && renameControl == controlName) { - var variableDeclarations = (VariableDeclarationCollection)metadata.parent.value; - var declaration = (VariableDeclaration)nameMetadata.parent.value; + GUI.FocusControl(controlName); + renameControl = null; + } - if (StringUtility.IsNullOrWhiteSpace(newName)) - { - EditorUtility.DisplayDialog("Edit Variable Name", "Please enter a variable name.", "OK"); - return; - } - else if (variableDeclarations.Contains(newName)) + if (EndBlock(nameMetadata) && ProcessRename(oldName, newName, declaration, parent?.kind)) + { + GUI.FocusControl(null); + } + + if (addedItem) + { + addedItem = false; + GUI.FocusControl(controlName); + } + } + + private bool ProcessRename(string oldName, string newName, VariableDeclaration declaration, VariableKind? kind) + { + var variableDeclarations = (VariableDeclarationCollection)metadata.parent.value; + + if (StringUtility.IsNullOrWhiteSpace(newName)) + { + EditorUtility.DisplayDialog("Edit Variable Name", "Please enter a variable name.", "OK"); + return false; + } + if (variableDeclarations.Contains(newName) && newName != oldName) + { + EditorUtility.DisplayDialog("Edit Variable Name", "A variable with the same name already exists.", "OK"); + return false; + } + if (oldName == newName) return false; + + nameMetadata.RecordUndo(); + RecordSceneUndo(kind); + + variableDeclarations.EditorRename(declaration, newName); + nameMetadata.value = newName; + + UpdateVariableReferences(kind, oldName, newName); + + if (isRenaming) + { + GraphUtility.RenameVariables(parent.kind.Value, oldName, newName, metadata); + } + return true; + } + + private void RecordSceneUndo(VariableKind? kind) + { + if (kind != VariableKind.Scene) return; + + if (GraphWindow.active != null && GraphWindow.activeReference?.scene != null) + { + Undo.RecordObject(SceneVariables.Instance(GraphWindow.activeReference.scene.Value).variables, "Changed Scene variable name"); + return; + } + + for (int i = 0; i < SceneManager.sceneCount; i++) + { + var scene = SceneManager.GetSceneAt(i); + if (scene.isLoaded && VisualScripting.Variables.Scene(scene) == metadata.parent.value) { - EditorUtility.DisplayDialog("Edit Variable Name", "A variable with the same name already exists.", "OK"); - return; + Undo.RecordObject(SceneVariables.Instance(scene).variables, "Changed Scene variable name"); + break; } - var kind = - (typeof(Inspector).GetField("parentInspector", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(this) as VariableDeclarationsInspector).kind; - nameMetadata.RecordUndo(); - if (kind == VariableKind.Scene) - { - if (GraphWindow.active != null && GraphWindow.activeReference?.scene != null) - Undo.RecordObject(SceneVariables.Instance(GraphWindow.activeReference.scene.Value).variables, "Changed Scene variable name"); + } + } + + private void UpdateVariableReferences(VariableKind? kind, string oldName, string newName) + { + switch (kind) + { + case VariableKind.Flow: + case VariableKind.Graph: + if (EditorWindow.focusedWindow == GraphWindow.active) + GraphUtility.UpdateAllGraphVariables((FlowGraph)GraphWindow.activeContext.graph, oldName, newName); + else if (VariablesWindow.isVariablesWindowContext && VariablesWindow.currentContext != null) + GraphUtility.UpdateAllGraphVariables((FlowGraph)VariablesWindow.currentContext.graph, oldName, newName); + break; + + case VariableKind.Object: + var objAncestor = metadata.Ancestor(m => m.value is VisualScripting.Variables); + if (objAncestor?.value != null) + GraphUtility.UpdateAllObjectVariables((objAncestor.value as VisualScripting.Variables).gameObject, oldName, newName); + else if (EditorWindow.focusedWindow == GraphWindow.active && GraphWindow.activeReference?.gameObject != null) + GraphUtility.UpdateAllObjectVariables(GraphWindow.activeReference.gameObject, oldName, newName); + break; + + case VariableKind.Scene: + var sceneAncestor = metadata.Ancestor(m => m.value is VisualScripting.Variables); + if (sceneAncestor?.value != null) + GraphUtility.UpdateAllSceneVariables((sceneAncestor.value as VisualScripting.Variables).gameObject.scene, oldName, newName); + else if (EditorWindow.focusedWindow == GraphWindow.active && GraphWindow.activeReference?.scene != null) + GraphUtility.UpdateAllSceneVariables(GraphWindow.activeReference.scene.Value, oldName, newName); else + Debug.LogWarning("[Rename Variables] Could not find valid scene to update variables."); + break; + + case VariableKind.Application: + case VariableKind.Saved: + if (Application.isPlaying) { - Scene? current = null; - for (int i = 0; i < SceneManager.sceneCount; i++) - { - var scene = SceneManager.GetSceneAt(i); - if (!scene.isLoaded) continue; - - var variables = VisualScripting.Variables.Scene(scene); - - if (variables == metadata.parent.value) - { - current = scene; - break; - } - } - - if (current != null) - { - Undo.RecordObject(SceneVariables.Instance(current.Value).variables, "Changed Scene variable name"); - } + Debug.LogWarning($"[Rename Variables] Cannot rename {kind} variables while in play mode!"); + break; } - } - variableDeclarations.EditorRename(declaration, newName); - nameMetadata.value = newName; + bool choice = changed = EditorUtility.DisplayDialog( + $"Update ALL {kind} Variables?", + $"This will go through ALL scenes and macros to find every Variable Unit using '{oldName}' and update it to '{newName}'.\n\nThis operation is FINAL and cannot be undone!", + "Update All", "Rename Only"); - switch (kind) - { - case VariableKind.Flow: - case VariableKind.Graph: - if (EditorWindow.focusedWindow == GraphWindow.active) - GraphUtility.UpdateAllGraphVariables((FlowGraph)GraphWindow.activeContext.graph, oldName, newName); - else if (VariablesWindow.isVariablesWindowContext && VariablesWindow.currentContext != null) - GraphUtility.UpdateAllGraphVariables((FlowGraph)VariablesWindow.currentContext.graph, oldName, newName); - break; - case VariableKind.Object: - { - var ancestor = metadata.Ancestor(m => m.value is VisualScripting.Variables); - if (ancestor != null && ancestor.value != null) - { - var gameObject = (ancestor.value as VisualScripting.Variables).gameObject; - GraphUtility.UpdateAllObjectVariables(gameObject, oldName, newName); - } - else if (EditorWindow.focusedWindow == GraphWindow.active && GraphWindow.activeReference != null) - { - if (GraphWindow.activeReference.gameObject != null) - GraphUtility.UpdateAllObjectVariables(GraphWindow.activeReference.gameObject, oldName, newName); - } - } - break; - case VariableKind.Scene: - { - var ancestor = metadata.Ancestor(m => m.value is VisualScripting.Variables); - if (ancestor != null && ancestor.value != null) - { - var scene = (ancestor.value as VisualScripting.Variables).gameObject.scene; - GraphUtility.UpdateAllSceneVariables(scene, oldName, newName); - } - else if (EditorWindow.focusedWindow == GraphWindow.active && GraphWindow.activeReference != null) - { - if (GraphWindow.activeReference.scene != null) - GraphUtility.UpdateAllSceneVariables(GraphWindow.activeReference.scene.Value, oldName, newName); - else - { - Scene? current = null; - for (int i = 0; i < SceneManager.sceneCount; i++) - { - var scene = SceneManager.GetSceneAt(i); - if (!scene.isLoaded) continue; - - var variables = VisualScripting.Variables.Scene(scene); - - if (variables == metadata.parent.value) - { - current = scene; - break; - } - } - - if (current == null) - { - Debug.LogWarning( - $"[Rename Variables] Could not find the scene that this variable is in please ensure that the scene is valid and loaded." - ); - break; - } - - GraphUtility.UpdateAllSceneVariables(current.Value, oldName, newName); - } - } - } - break; - case VariableKind.Application: - { - if (Application.isPlaying) - { - Debug.LogWarning($"[Rename Variables] Cannot rename all Application variables while in play mode!"); - break; - } - bool choice = changed = EditorUtility.DisplayDialog( - "Update ALL Application Variables?", - "This will go through ALL scenes and macros to find every Variable Unit " - + $"using {oldName} and update it to {newName}.\n\n" - + "This operation is FINAL and cannot be undone!", - "Update All", - "Rename Only" - ); - - if (choice) - { - GraphUtility.RenameApplicationVariables(oldName, newName); - } - } - break; - case VariableKind.Saved: - { - if (Application.isPlaying) - { - Debug.LogWarning($"[Rename Variables] Cannot rename all Saved variables while in play mode!"); - break; - } - bool choice = changed = EditorUtility.DisplayDialog( - "Update ALL Saved Variables?", - "This will go through ALL scenes and macros to find every Variable Unit " - + $"using {oldName} and update it to {newName}.\n\n" - + "This operation is FINAL and cannot be undone!", - "Update All", - "Rename Only" - ); - - if (choice) - { - GraphUtility.RenameSavedVariables(oldName, newName); - } - } - break; - } + if (choice && kind == VariableKind.Application) GraphUtility.RenameApplicationVariables(oldName, newName); + else if (choice && kind == VariableKind.Saved) GraphUtility.RenameSavedVariables(oldName, newName); + break; + } + } + + private void DoCommand(GUIContent command, int itemIndex) + { + if (command == Rename) + { + isRenaming = true; + renameControl = TextControl + (metadata.parent[itemIndex].value as VariableDeclaration).name; + return; } + s_ContextCommandNameFieldInfo.SetValueOptimized(null, command.text); + listControl.DoCommand(command.text, itemIndex, adaptor); + } + + private void AddItemsToMenu(GenericMenu menu, int itemIndex) + { + void Action(object v) => DoCommand(v as GUIContent, itemIndex); + + menu.AddItem(Rename, false, Action, Rename); + menu.AddSeparator(""); + + if (itemIndex > 0) menu.AddItem(CommandMoveToTop, false, Action, CommandMoveToTop); + else menu.AddDisabledItem(CommandMoveToTop); + + if (itemIndex + 1 < metadata.parent.Count) menu.AddItem(CommandMoveToBottom, false, Action, CommandMoveToBottom); + else menu.AddDisabledItem(CommandMoveToBottom); + + menu.AddSeparator(""); + menu.AddItem(CommandDuplicate, false, Action, CommandDuplicate); + + if (menu.GetItemCount() > 0) menu.AddSeparator(""); + + menu.AddItem(CommandRemove, false, Action, CommandRemove); + menu.AddSeparator(""); + menu.AddItem(CommandClearAll, false, Action, CommandClearAll); } public void OnValueGUI(Rect valuePosition) @@ -269,4 +807,5 @@ public static class Styles public static readonly float spacing = EditorGUIUtility.standardVerticalSpacing; } } -} +#endif +} \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Inspectors/Variables/PatchedVariableDeclerationsInpsector.cs b/Editor/Nodes/Fundamentals/Inspectors/Variables/PatchedVariableDeclerationsInpsector.cs deleted file mode 100644 index 5562cb20..00000000 --- a/Editor/Nodes/Fundamentals/Inspectors/Variables/PatchedVariableDeclerationsInpsector.cs +++ /dev/null @@ -1,1009 +0,0 @@ -using UnityEditor; -using UnityEngine; -using System; -using System.Collections.Generic; -using System.Reflection; -using Unity.VisualScripting.Community.Libraries.Humility; -using Unity.VisualScripting.ReorderableList; -using Unity.VisualScripting.ReorderableList.Internal; -using UnityEngine.SceneManagement; -using System.Linq; -using System.Text; - -namespace Unity.VisualScripting.Community -{ - public class PatchedVariableDeclarationsInspector : VariableDeclarationsInspector - { - private VariableDeclarationsAdaptor adaptor; - private string newName; - - internal Dictionary foldouts; - - public PatchedVariableDeclarationsInspector(Metadata metadata) : base(metadata) - { - } - - public override void Initialize() - { - base.Initialize(); - - var variableDecls = metadata.value as VariableDeclarations; - - if (variableDecls == null) - return; - - var collection = metadata["collection"]; - - foldouts ??= new Dictionary(); - - foreach (var declaration in variableDecls) - { - if (foldouts.TryGetValue(declaration, out var existing)) - { - existing.name = declaration.name; - foldouts[declaration] = existing; - } - else - { - foldouts[declaration] = new VariableFoldout(declaration.name, false); - } - } - -#pragma warning disable 618 - kind = metadata.GetAttribute()?.kind; -#pragma warning restore 618 -#if VISUAL_SCRIPTING_1_7 - kind ??= variableDecls.Kind; -#endif - adaptor = new VariableDeclarationsAdaptor(collection, this); - } - - protected override void OnGUI(Rect position, GUIContent label) - { - if (metadata.value == null) - return; - - position.x = 0; - if (metadata.parent.definedType == typeof(VisualScripting.Variables)) - { - position.width = LudiqGUIUtility.currentInspectorWidthWithoutScrollbar; - } - - if (EditorPrefs.GetBool(ProjectSettingsProviderView.ShowVariablesQuickbarKey, false) && !metadata.HasAttribute()) - { - DrawQuickAddToolbar(position); - - position.y += (ButtonHeight * 2) + ButtonSpacingY + (ToolbarPadding * 2); - position.height -= (ButtonHeight * 2) + ButtonSpacingY + (ToolbarPadding * 2); - } - - var normal = GUI.backgroundColor; - adaptor.Field(position, label); - // Restore color after tinting add button - GUI.backgroundColor = normal; - - if (metadata.parent.definedType != typeof(VisualScripting.Variables)) - { - position.width -= 1; - } - - var newNamePosition = new Rect(position.x, position.yMax - 20, position.width - Styles.addButtonWidth, 18); - - if (adaptor.Count == 0) - { - newNamePosition.y = position.yMax - 20; - } - - newNamePosition.height += 1; - OnNewNameGUI(newNamePosition); - } - - private static readonly GUIContent[] quickTypesLabels = - { - new GUIContent("Float", typeof(float).Icon()[IconSize.Small]), new GUIContent("Int", typeof(int).Icon()[IconSize.Small]), new GUIContent("Bool", typeof(bool).Icon()[IconSize.Small]), - new GUIContent("String", typeof(string).Icon()[IconSize.Small]), - new GUIContent("Vector", typeof(Vector4).Icon()[IconSize.Small]), new GUIContent("Color", typeof(Color).Icon()[IconSize.Small]), new GUIContent("Object", typeof(GameObject).Icon()[IconSize.Small]), - new GUIContent("Other", typeof(Generic).Icon()[IconSize.Small]) - }; - - private static readonly string[] quickTypes = { "Float", "Int", "Bool", "String", "Vector", "Color", "Object", "Other" }; - - private const float Spacing = 4f; - private const float ButtonHeight = 27f; - private const float ButtonSpacingX = 4f; - private const float ButtonSpacingY = 4f; - private const float CornerRadius = 10f; - private const float ToolbarPadding = 6f; - - private void DrawQuickAddToolbar(Rect position) - { - int columns = 4; - int rows = 2; - float totalHeight = (ButtonHeight * rows) + ButtonSpacingY + (ToolbarPadding * 2); - Rect toolbarRect = new Rect(position.x, position.y, position.width, totalHeight); -#if DARKER_UI - EditorGUI.DrawRect(toolbarRect, CommunityStyles.backgroundColor); -#else - EditorGUI.DrawRect(toolbarRect, ColorPalette.unityBackgroundLight); -#endif - float availableWidth = toolbarRect.width - ToolbarPadding * 2; - - float totalSpacingX = ButtonSpacingX * (columns - 1); - float buttonWidthAdjusted = (availableWidth - totalSpacingX) / columns; - - float xStart = toolbarRect.x + ToolbarPadding; - float yStart = toolbarRect.y + ToolbarPadding; - - for (int i = 0; i < quickTypesLabels.Length; i++) - { - int row = i / columns; - int col = i % columns; - - float x = xStart + col * (buttonWidthAdjusted + ButtonSpacingX); - float y = yStart + row * (ButtonHeight + ButtonSpacingY); - - Rect buttonRect = new Rect(x, y, buttonWidthAdjusted, ButtonHeight); - - if (DrawRoundedButton(buttonRect, quickTypesLabels[i], out var mouse)) - { - bool isRight = mouse == MouseButton.Right; - switch (quickTypes[i]) - { - case "Float": - { - var menu = new GenericMenu(); - menu.AddItem(new GUIContent("float"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(float), true)); - menu.AddItem(new GUIContent("double"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(double), true)); - menu.AddItem(new GUIContent("decimal"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(decimal), true)); - menu.DropDown(buttonRect); - break; - } - - case "Int": - { - var menu = new GenericMenu(); - menu.AddItem(new GUIContent("int"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(int))); - menu.AddItem(new GUIContent("short"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(short), true)); - menu.AddItem(new GUIContent("long"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(long), true)); - menu.AddItem(new GUIContent("byte"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(byte), true)); - menu.AddItem(new GUIContent("sbyte"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(sbyte), true)); - menu.AddSeparator(""); - menu.AddItem(new GUIContent("uint"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(uint), true)); - menu.AddItem(new GUIContent("ushort"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(ushort), true)); - menu.AddItem(new GUIContent("ulong"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(ulong), true)); - menu.DropDown(buttonRect); - break; - } - - case "String": - AddQuickVariable(isRight ? typeof(List) : typeof(string), true); - break; - - case "Bool": - AddQuickVariable(isRight ? typeof(List) : typeof(bool), true); - break; - - case "Vector": - { - var menu = new GenericMenu(); - menu.AddItem(new GUIContent("Vector 2"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Vector2), true)); - menu.AddItem(new GUIContent("Vector 3"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Vector3), true)); - menu.AddItem(new GUIContent("Vector 4"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Vector4), true)); - menu.AddSeparator(""); - menu.AddItem(new GUIContent("Vector 2 Int"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Vector2Int), true)); - menu.AddItem(new GUIContent("Vector 3 Int"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Vector3Int), true)); - menu.DropDown(buttonRect); - break; - } - - case "Color": - { - var menu = new GenericMenu(); - menu.AddItem(new GUIContent("Color"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Color))); - menu.AddItem(new GUIContent("HDRColor"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(HDRColor), true)); - menu.AddItem(new GUIContent("Gradient"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Gradient), true)); - menu.DropDown(buttonRect); - break; - } - - case "Object": - AddQuickVariable(isRight ? typeof(List) : typeof(GameObject), true); - break; - - case "Other": - TypeBuilderWindow.ShowWindow(buttonRect, (t) => - { - bool ask = false; - if (e.shift) - { - ask = true; - } - AddQuickVariable(t, ask); - }, typeof(object), true, Array.Empty()); - break; - } - } - } - } - - private static GUIStyle _labelStyle; - - private static GUIStyle labelStyle - { - get - { - _labelStyle ??= new GUIStyle(EditorStyles.label) - { - border = new RectOffset((int)CornerRadius, (int)CornerRadius, (int)CornerRadius, (int)CornerRadius), - padding = new RectOffset(4, 4, 2, 2), - alignment = TextAnchor.MiddleLeft, - normal = { textColor = !EditorGUIUtility.isProSkin ? Color.black : Color.white } - }; - - return _labelStyle; - } - } - - private static bool DrawRoundedButton(Rect rect, GUIContent content, out MouseButton? mouseButton) - { - var e = Event.current; - - bool containsMouse = e != null && rect.Contains(e.mousePosition); - bool isClick = containsMouse && e.type == EventType.MouseDown && e.button == 0; - - bool isRightClick = containsMouse && e.type == EventType.MouseDown && e.button == 1; - - var previous = EditorGUIUtility.GetIconSize(); - - EditorGUIUtility.SetIconSize(new Vector2(16, 16)); - - var color = Color.gray.Brighten(0.1f); - - if (isClick || isRightClick) - { - color = CommunityStyles.backgroundColor; - } - else if (containsMouse) - { - color = CommunityStyles.backgroundColor.Brighten(0.3f); - } - - LudiqGUI.DrawEmptyRect(rect, color); - - EditorGUI.LabelField(rect, content, labelStyle); - - EditorGUIUtility.SetIconSize(previous); - - var texRect = new Rect(rect.xMax - 14, rect.y + 9, EditorGUIUtility.isProSkin ? 8 : 10, 10); - GUI.DrawTexture(texRect, ReorderableListResources.GetTexture(ReorderableListTexture.Icon_Add_Normal)); - - if (isClick) - { - mouseButton = MouseButton.Left; - e.Use(); - return true; - } - else if (isRightClick) - { - mouseButton = MouseButton.Right; - e.Use(); - return true; - } - - mouseButton = null; - return false; - } - - private void AddQuickVariable(Type type, bool ask = false) - { - string typeKey = Application.dataPath + $"_Community_ShowTypePopup_{type.AssemblyQualifiedName}"; - - bool hasSeenPopup = EditorPrefs.GetBool(typeKey, false); - - if (ask && !Codebase.settingsTypes.Contains(type) && !hasSeenPopup) - { - int choice = EditorUtility.DisplayDialogComplex( - "Add Type to Settings", - $"The type '{type.As().CSharpName(false, false, false)}' is not currently in your settings types.\n\nWould you like to add it?", - "Add", - "No", - "Add && Regenerate" - ); - - var coreConfig = BoltCore.Configuration; - - switch (choice) - { - case 0: - coreConfig.typeOptions.Add(type); - SaveCoreConfig(coreConfig); - Codebase.UpdateSettings(); - break; - - case 1: - break; - - case 2: - coreConfig.typeOptions.Add(type); - SaveCoreConfig(coreConfig); - Codebase.UpdateSettings(); - UnitBase.Rebuild(); - break; - } - - EditorPrefs.SetBool(typeKey, true); - } - - var variableDecls = (VariableDeclarations)metadata.value; - - var collection = (VariableDeclarationCollection)metadata["collection"].value; - - string baseName = type.HumanName(false); - string newVarName = baseName; - int counter = 1; - - while (variableDecls.IsDefined(newVarName)) - { - newVarName = $"{baseName} ({counter++})"; - } - - var newVar = new VariableDeclaration(newVarName, Default(type)); -#if VISUAL_SCRIPTING_1_7 - newVar.typeHandle = new SerializableType(type.AssemblyQualifiedName); -#endif - collection.Add(newVar); - - metadata.RecordUndo(); - - foldouts[newVar] = new VariableFoldout(newVarName, true); - - SetHeightDirty(); - } - - private object Default(Type type) - { - var value = type.PseudoDefault(); - - if (value == null && type == typeof(Gradient)) return new Gradient(); - return value; - } - - private void SaveCoreConfig(BoltCoreConfiguration coreConfig) - { - var metadata = coreConfig.GetMetadata(nameof(coreConfig.typeOptions)); - - metadata.Inspector().SetHeightDirty(); -#if VISUAL_SCRIPTING_1_9_0_OR_GREATER - metadata.GetType() - .GetMethod("SaveImmediately", BindingFlags.Instance | BindingFlags.NonPublic) - .Invoke(metadata, new object[] { true }); -#else - metadata.Save(); -#endif - } - - private bool highlightPlaceholder; - private bool highlightNewNameField; - private const string newNameFieldControl = "Community_Variables_newNameField"; - - private void OnNewNameGUI(Rect newNamePosition) - { - EditorGUI.BeginChangeCheck(); - - GUI.SetNextControlName(newNameFieldControl); - newName = EditorGUI.TextField(newNamePosition, newName, highlightNewNameField ? Styles.newNameFieldHighlighted : Styles.newNameField); - - var e = UnityEngine.Event.current; - if (GUI.GetNameOfFocusedControl() == newNameFieldControl && e.type == EventType.KeyUp && e.keyCode == KeyCode.Return) - { - adaptor.Add(); - GUI.FocusControl(newNameFieldControl); - GUI.changed = true; - } - - if (EditorGUI.EndChangeCheck()) - { - highlightNewNameField = false; - highlightPlaceholder = false; - } - - if (string.IsNullOrEmpty(newName)) - { - GUI.Label(newNamePosition, "(New Variable Name)", highlightPlaceholder ? Styles.placeholderHighlighted : Styles.placeholder); - } - } - - protected override float GetHeight(float width, GUIContent label) - { - return adaptor.GetHeight(width, label) + (EditorPrefs.GetBool(ProjectSettingsProviderView.ShowVariablesQuickbarKey, false) && !metadata.HasAttribute() ? (ButtonHeight * 2) + ButtonSpacingY + (ToolbarPadding * 2) : 0); - } - - public class VariableDeclarationsAdaptor : MetadataListAdaptor, IReorderableListDropTarget - { - private const float FoldoutHeight = 30f; - private const float FieldHeight = 18f; - private const float VerticalSpacing = 4f; - private const float DeleteButtonWidth = 18f; - - public ReorderableListControl listControl; - private static readonly FieldInfo listControlFieldInfo = typeof(MetadataCollectionAdaptor).GetField("listControl", BindingFlags.NonPublic | BindingFlags.Instance); - - private static Type InternalListAdaptorType = typeof(VariableDeclarationsInspector).GetNestedType("ListAdaptor", BindingFlags.NonPublic); - - public new readonly PatchedVariableDeclarationsInspector parentInspector; - - public VariableDeclarationsAdaptor(Metadata metadata, PatchedVariableDeclarationsInspector parent) : base(metadata, parent) - { - parentInspector = parent; - - if (listControlFieldInfo != null) - { - listControl = listControlFieldInfo.GetValue(this) as ReorderableListControl; - if (listControl != null) - { - listControl.ContainerStyle = GUIStyle.none; - listControl.Flags = ReorderableListFlags.HideRemoveButtons; - listControl.HorizontalLineColor = EditorGUIUtility.isProSkin ? Color.black : Color.white; - listControl.HorizontalLineAtStart = true; - listControl.HorizontalLineAtEnd = true; - } - } - - alwaysDragAndDrop = true; - } - - protected override bool CanDrop(object item) - { - var variableDeclaration = (VariableDeclaration)item; - - if (((VariableDeclarations)parentInspector.metadata.value).IsDefined(variableDeclaration.name)) - { - EditorUtility.DisplayDialog("Dragged Variable", "A variable with the same name already exists.", "OK"); - return false; - } - - return base.CanDrop(item); - } - -#if DARKER_UI - // I have to do this setup to change the color of the add button - // It's very hacky but seems to work better than tinting the background Texture. - private Color _previousBackgroundColor; - private bool _tintApplied; - private bool initialized; - /// - /// Called before list elements are drawn. - /// Ensures the GUI color is reset properly. - /// - public override void BeginGUI() - { - if (_tintApplied) - { - GUI.backgroundColor = _previousBackgroundColor; - _tintApplied = false; - } - - if (initialized) - { - return; - } - - initialized = true; - - for (int i = 0; i < (metadata.value as VariableDeclarationCollection).Count; i++) - { - var element = metadata[i]; - var valueMetadata = element["value"]; - - var inspector = valueMetadata.Inspector(); - try - { - var valueInspector = typeof(SystemObjectInspector).GetField("inspector", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(inspector); - valueInspector.GetType().GetMethod("ResolveType", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(valueInspector, Array.Empty()); - } - catch { } - } - } - - /// - /// Called after all list elements are drawn but before drawing the Add Item button. - /// Tints the Add button only. - /// - public override void EndGUI() - { - _previousBackgroundColor = GUI.backgroundColor; - GUI.backgroundColor = CommunityStyles.backgroundColor.Brighten(0.36f); - _tintApplied = true; - } -#endif - public override float GetItemHeight(float width, int index) - { - var element = metadata[index]; - var declaration = (VariableDeclaration)element.value; - - if (!parentInspector.foldouts.TryGetValue(declaration, out var foldout)) - { - foldout = new VariableFoldout(declaration.name, false); - parentInspector.foldouts[declaration] = foldout; - } - - if (!foldout.isExpanded) - return FoldoutHeight + VerticalSpacing; - - var valueHeight = LudiqGUI.GetInspectorHeight(parentInspector, element["value"], width, GUIContent.none); - float h = FoldoutHeight + valueHeight + 6f; - - return h; - } - - public override void DrawItemBackground(Rect position, int index) - { -#if DARKER_UI - EditorGUI.DrawRect(position, CommunityStyles.backgroundColor); -#else - EditorGUI.DrawRect(position, ColorPalette.unityBackgroundLight); -#endif - - var restoredColor = Handles.color; - Handles.color = Color.gray * 0.6f; - Handles.DrawAAPolyLine(2f, new Vector3[] - { - new Vector3(position.x, position.y + 1), - new Vector3(position.xMax, position.y + 1), - new Vector3(position.xMax, position.yMax), - new Vector3(position.x, position.yMax), - new Vector3(position.x, position.y) - }); - Handles.color = restoredColor; - } - - private HashSet updatedInspectors = new HashSet(); - - public override void DrawItem(Rect position, int index) - { - var element = metadata[index]; - var declaration = (VariableDeclaration)element.value; - - if (!parentInspector.foldouts.TryGetValue(declaration, out var foldout)) - { - foldout = new VariableFoldout(declaration.name, false); - parentInspector.foldouts[declaration] = foldout; - } - - GraphReference reference = null; - UnityEngine.Object root = null; - Guid[] parentGuids = null; - - if (VariablesWindow.isVariablesWindowContext) - { - reference = VariablesWindow.currentContext?.reference; - root = reference?.rootObject; - parentGuids = reference?.parentElementGuids?.ToArray(); - } - else - { - reference = LudiqGraphsEditorUtility.editedContext?.value?.reference; - root = reference?.rootObject; - parentGuids = reference?.parentElementGuids?.ToArray(); - } - - var ancestor = metadata.Ancestor(m => m.value is VisualScripting.Variables); - if (ancestor != null) - { - if (ancestor != null) - { - root = ancestor.value as VisualScripting.Variables; - } - parentGuids = new Guid[0]; - } - - if (parentInspector.kind == VariableKind.Application) - { - root = ApplicationVariables.asset; - parentGuids = new Guid[0]; - } - else if (parentInspector.kind == VariableKind.Saved) - { - root = SavedVariables.asset; - parentGuids = new Guid[0]; - } - - if (root != null && updatedInspectors.Add(declaration)) - { - foldout.isExpanded = VariableInspectorState.Load(root, parentGuids, declaration.name); - } - - position.x -= 20; - position.width += 20; - - var oldHandleRect = new Rect(position.x + 4, position.y + position.height / 2f - 3, 9, 7); -#if DARKER_UI - EditorGUI.DrawRect(oldHandleRect, CommunityStyles.backgroundColor); -#else - EditorGUI.DrawRect(oldHandleRect, ColorPalette.unityBackgroundLight); -#endif - - float y = position.y + 2f; - Rect boxRect = new Rect(position.x, y, position.width, GetItemHeight(index)); - float lineY = boxRect.y + ((FoldoutHeight - 16f) / 2f) + Spacing - 2; - - float handleSize = 12f; - Rect handleRect = new Rect(position.x + 2, lineY, handleSize, handleSize); - GUI.DrawTexture(handleRect, CommunityStyles.DragHandleTexture); - EditorGUIUtility.AddCursorRect(handleRect, MouseCursor.Pan); - - Rect foldoutRect = new Rect(handleRect.x + handleRect.width + Spacing, lineY, 14, 16); - Texture2D arrow = foldout.isExpanded ? CommunityStyles.ArrowDownTexture : CommunityStyles.ArrowRightTexture; - if (arrow) GUI.DrawTexture(foldoutRect, arrow, ScaleMode.ScaleToFit); - - if (Event.current.type == EventType.MouseDown && foldoutRect.Contains(Event.current.mousePosition)) - { - foldout.isExpanded = !foldout.isExpanded; - parentInspector.foldouts[declaration] = foldout; - Event.current.Use(); - if (root != null) - VariableInspectorState.Save(root, parentGuids, declaration.name, foldout.isExpanded); - } - - var e = Event.current; - - bool draggingObjects = (DragAndDrop.objectReferences != null && DragAndDrop.objectReferences.Length > 0) || - DragAndDrop.GetGenericData(VisualScripting.DraggedListItem.TypeName) != null || - DragAndDrop.GetGenericData(DraggedDictionaryItem.TypeName) != null; - - if (e != null && draggingObjects && e.type == EventType.MouseDrag && e.button == (int)MouseButton.Left && boxRect.Contains(e.mousePosition)) - { - const float expandDelay = 0.35f; - if (!foldout.hoverStartTime.HasValue) - foldout.hoverStartTime = EditorApplication.timeSinceStartup; - - if (EditorApplication.timeSinceStartup - foldout.hoverStartTime.Value > expandDelay) - { - foldout.isExpanded = true; - parentInspector.foldouts[declaration] = foldout; - if (root != null) - VariableInspectorState.Save(root, parentGuids, declaration.name, true); - } - - parentInspector.SetHeightDirty(); - GUI.changed = true; - } - else - { - foldout.hoverStartTime = null; - } -#if !VISUAL_SCRIPTING_1_7 - var iconPosition = new Rect(foldoutRect.x + 15f, foldoutRect.y - 2, FieldHeight, FieldHeight); - var icon = element["value"].value?.GetType().Icon()?[IconSize.Small]; - if (icon == null) - { - icon = typeof(Null).Icon()?[IconSize.Small]; - } - GUI.DrawTexture(iconPosition, icon, ScaleMode.ScaleToFit); -#endif - float spacing = 4f; - float startX = foldoutRect.xMax + spacing; - float endX = position.x + position.width - DeleteButtonWidth - spacing; - float totalAvailable = endX - startX; -#if VISUAL_SCRIPTING_1_7 - float halfWidth = (totalAvailable - spacing) / 2f; - - Rect nameRect = new Rect(startX, lineY - 2f, halfWidth, FieldHeight); - Rect typeRect = new Rect(nameRect.xMax + spacing, lineY - 2f, halfWidth, FieldHeight); -#else - Rect nameRect = new Rect(startX + iconPosition.width, lineY - 2f, totalAvailable - spacing - iconPosition.width, FieldHeight); -#endif - OnNameGUI(nameRect, element["name"]); -#if VISUAL_SCRIPTING_1_7 - using (adaptiveWidth.Override(true)) // Hide the Type label - { - var typeInspector = element["typeHandle"].Inspector(); - typeInspector.Draw(typeRect, GUIContent.none); - } -#endif - Rect deleteRect = new Rect(position.x + position.width - DeleteButtonWidth - 4, lineY - 2f, DeleteButtonWidth, FieldHeight); - if (GUI.Button(deleteRect, "", new GUIStyle(EditorStyles.whiteLabel) - { - normal = { background = CommunityStyles.RemoveItemTexture } - })) - { - Remove(index); - return; - } - - if (foldout.isExpanded) - { - var valueInspector = element["value"].Inspector(); - float contentY = boxRect.y + FoldoutHeight; - EditorGUI.indentLevel++; - var width = position.width - DeleteButtonWidth - 8; - valueInspector.Draw( - new Rect(position.x + 20, contentY, width, - LudiqGUI.GetInspectorHeight(parentInspector, element["value"], width, GUIContent.none)), - GUIContent.none - ); - EditorGUI.indentLevel--; - } - - HandleDragAndDrop(position, handleRect, index, declaration, foldout); - } - - private void HandleDragAndDrop(Rect position, Rect handleRect, int index, VariableDeclaration declaration, VariableFoldout foldout) - { - int controlID = GUIUtility.GetControlID(FocusType.Passive); - var e = Event.current; - - switch (e.GetTypeForControl(controlID)) - { - case EventType.MouseDown: - if (e.button == (int)MouseButton.Left && position.Contains(e.mousePosition) && !handleRect.Contains(Event.current.mousePosition)) - { - GUIUtility.hotControl = controlID; - e.Use(); - } - break; - - case EventType.MouseDrag: - if (GUIUtility.hotControl == controlID) - { - var item = this[index]; - - var list = InternalListAdaptorType.Instantiate(false, metadata, parentInspector) as MetadataListAdaptor; - - GUIUtility.hotControl = 0; - DragAndDrop.PrepareStartDrag(); - DragAndDrop.objectReferences = new UnityEngine.Object[0]; - DragAndDrop.paths = new string[0]; - DragAndDrop.SetGenericData( - VisualScripting.DraggedListItem.TypeName, - new DraggedListItem(list, index, item, (declaration, foldout)) - ); - DragAndDrop.StartDrag(metadata.path); - e.Use(); - } - break; - } - } - - public override void Remove(int index) - { - var declaration = (VariableDeclaration)metadata[index].value; - - parentInspector.foldouts?.Remove(declaration); - - base.Remove(index); - GUIUtility.keyboardControl = 0; - GUIUtility.hotControl = 0; - EditorGUIUtility.editingTextField = false; - GUIUtility.ExitGUI(); - } - - public void OnNameGUI(Rect namePosition, Metadata nameMetadata) - { - namePosition = BeginLabeledBlock(nameMetadata, namePosition, GUIContent.none); - var restoreColor = GUI.backgroundColor; -#if DARKER_UI - GUI.backgroundColor = EditorGUIUtility.isProSkin ? restoreColor.Darken(0.25f) : restoreColor; -#endif - var oldName = (string)nameMetadata.value; - var newName = EditorGUI.DelayedTextField(namePosition, (string)nameMetadata.value, new GUIStyle(EditorStyles.textField) { fontStyle = FontStyle.Bold }); - GUI.backgroundColor = restoreColor; - - if (EndBlock(nameMetadata)) - { - var variableDeclarations = (VariableDeclarationCollection)metadata.value; - var declaration = (VariableDeclaration)nameMetadata.parent.value; - - if (StringUtility.IsNullOrWhiteSpace(newName)) - { - EditorUtility.DisplayDialog("Edit Variable Name", "Please enter a variable name.", "OK"); - return; - } - else if (variableDeclarations.Contains(newName)) - { - EditorUtility.DisplayDialog("Edit Variable Name", "A variable with the same name already exists.", "OK"); - return; - } - - nameMetadata.RecordUndo(); - if (parentInspector.kind == VariableKind.Scene) - { - if (GraphWindow.active != null && GraphWindow.activeReference?.scene != null) - Undo.RecordObject(SceneVariables.Instance(GraphWindow.activeReference.scene.Value).variables, "Changed Scene variable name"); - else - { - Scene? current = null; - for (int i = 0; i < SceneManager.sceneCount; i++) - { - var scene = SceneManager.GetSceneAt(i); - if (!scene.isLoaded) continue; - - var variables = VisualScripting.Variables.Scene(scene); - - if (variables == metadata.parent.value) - { - current = scene; - break; - } - } - - if (current != null) - { - Undo.RecordObject(SceneVariables.Instance(current.Value).variables, "Changed Scene variable name"); - } - } - } - variableDeclarations.EditorRename(declaration, newName); - (parentInspector.metadata.value as VariableDeclarations).Set(newName, declaration.value); - nameMetadata.value = newName; - - switch (parentInspector.kind) - { - case VariableKind.Graph: - if (EditorWindow.focusedWindow == GraphWindow.active) - GraphUtility.UpdateAllGraphVariables((FlowGraph)GraphWindow.activeContext.graph, oldName, newName); - else if (VariablesWindow.isVariablesWindowContext && VariablesWindow.currentContext != null) - GraphUtility.UpdateAllGraphVariables((FlowGraph)VariablesWindow.currentContext.graph, oldName, newName); - break; - case VariableKind.Object: - { - var ancestor = metadata.Ancestor(m => m.value is VisualScripting.Variables); - if (ancestor != null && ancestor.value != null) - { - var gameObject = (ancestor.value as VisualScripting.Variables).gameObject; - GraphUtility.UpdateAllObjectVariables(gameObject, oldName, newName); - } - else if (EditorWindow.focusedWindow == GraphWindow.active && GraphWindow.activeReference != null) - { - if (GraphWindow.activeReference.gameObject != null) - GraphUtility.UpdateAllObjectVariables(GraphWindow.activeReference.gameObject, oldName, newName); - } - } - break; - case VariableKind.Scene: - { - var ancestor = metadata.Ancestor(m => m.value is VisualScripting.Variables); - if (ancestor != null && ancestor.value != null) - { - var scene = (ancestor.value as VisualScripting.Variables).gameObject.scene; - GraphUtility.UpdateAllSceneVariables(scene, oldName, newName); - } - else if (EditorWindow.focusedWindow == GraphWindow.active && GraphWindow.activeReference != null) - { - if (GraphWindow.activeReference.scene != null) - GraphUtility.UpdateAllSceneVariables(GraphWindow.activeReference.scene.Value, oldName, newName); - else - { - Scene? current = null; - for (int i = 0; i < SceneManager.sceneCount; i++) - { - var scene = SceneManager.GetSceneAt(i); - if (!scene.isLoaded) continue; - - var variables = VisualScripting.Variables.Scene(scene); - - if (variables == metadata.parent.value) - { - current = scene; - break; - } - } - - if (current == null) - { - Debug.LogWarning( - $"[Rename Variables] Could not find the scene that this variable is in please ensure that the scene is valid and loaded." - ); - break; - } - - GraphUtility.UpdateAllSceneVariables(current.Value, oldName, newName); - } - } - } - break; - case VariableKind.Application: - { - if (Application.isPlaying) - { - Debug.LogWarning($"[Rename Variables] Cannot rename all Application variables while in play mode!"); - break; - } - bool choice = EditorUtility.DisplayDialog( - "Update ALL Application Variables?", - "This will go through ALL scenes and macros to find every Variable Unit " - + $"using {oldName} and update it to {newName}.\n\n" - + "This operation is FINAL and cannot be undone!", - "Update All", - "Rename Only" - ); - - if (choice) - { - GraphUtility.RenameApplicationVariables(oldName, newName); - } - } - break; - case VariableKind.Saved: - { - if (Application.isPlaying) - { - Debug.LogWarning($"[Rename Variables] Cannot rename all Saved variables while in play mode!"); - break; - } - bool choice = EditorUtility.DisplayDialog( - "Update ALL Saved Variables?", - "This will go through ALL scenes and macros to find every Variable Unit " - + $"using {oldName} and update it to {newName}.\n\n" - + "This operation is FINAL and cannot be undone!", - "Update All", - "Rename Only" - ); - - if (choice) - { - GraphUtility.RenameSavedVariables(oldName, newName); - } - } - break; - } - } - } - - protected override bool CanAdd() - { - if (StringUtility.IsNullOrWhiteSpace(parentInspector.newName)) - { - parentInspector.highlightPlaceholder = true; - EditorUtility.DisplayDialog("New Variable", "Please enter a variable name.", "OK"); - return false; - } - else if (((VariableDeclarations)parentInspector.metadata.value).IsDefined(parentInspector.newName)) - { - parentInspector.highlightNewNameField = true; - EditorUtility.DisplayDialog("New Variable", "A variable with the same name already exists.", "OK"); - return false; - } - - return true; - } - - protected override object ConstructItem() - { - var newItem = new VariableDeclaration(parentInspector.newName, null); - parentInspector.newName = null; - parentInspector.highlightPlaceholder = false; - parentInspector.highlightNewNameField = false; - return newItem; - } - - public new void ProcessDropInsertion(int insertionIndex) - { - if (Event.current.type == EventType.DragPerform) - { - var draggedItem = DragAndDrop.GetGenericData(VisualScripting.DraggedListItem.TypeName) as DraggedListItem; - - if (draggedItem != null) - { - if (InternalListAdaptorType.GetField("parentInspector", BindingFlags.Instance | BindingFlags.Public).GetValue(draggedItem.sourceListAdaptor) != parentInspector) - { - if (!CanDrop(draggedItem.item)) - return; - - parentInspector.foldouts ??= new Dictionary(); - - parentInspector.foldouts[draggedItem.variableState.Item1] = draggedItem.variableState.Item2; - } - else - { - Move(draggedItem.index, insertionIndex); - return; - } - } - } - - base.ProcessDropInsertion(insertionIndex); - } - } - } -} diff --git a/Editor/Nodes/Fundamentals/Inspectors/Variables/PatchedVariableDeclerationsInspector.cs b/Editor/Nodes/Fundamentals/Inspectors/Variables/PatchedVariableDeclerationsInspector.cs new file mode 100644 index 00000000..27f8e17e --- /dev/null +++ b/Editor/Nodes/Fundamentals/Inspectors/Variables/PatchedVariableDeclerationsInspector.cs @@ -0,0 +1,437 @@ +using UnityEditor; +using UnityEngine; +using System; +using System.Collections.Generic; +using System.Reflection; +using Unity.VisualScripting.Community.Libraries.Humility; +using Unity.VisualScripting.ReorderableList.Internal; +using Unity.VisualScripting.ReorderableList; +using System.IO; + +namespace Unity.VisualScripting.Community +{ + public class PatchedVariableDeclarationsInspector : VariableDeclarationsInspector + { + private static class Layout + { + public const float Spacing = 4f; + public const float ButtonHeight = 27f; + public const float ButtonSpacingX = 4f; + public const float ButtonSpacingY = 4f; + public const float CornerRadius = 10f; + public const float ToolbarPadding = 6f; + public const int QuickAddColumns = 4; + public const int QuickAddRows = 2; + public const int TitleHeight = 20; + } + + private const string NewVariableString = "newVariable"; + private const string QuickTypeTooltip = "Left-Click: Add single type\nRight-Click: Add List"; + private const string QuickOtherTypeTooltip = "Left-Click: Add single type\nHold Shift when pressing the Create Type button: Prompt to add to settings & regenerate"; + + internal string newName; + internal bool addedItem; + internal VariableDeclaration addedDeclaration; + public ReorderableListControl listControl { get; private set; } + + // Reflection Caching + private static readonly FieldInfo AdaptorField = typeof(VariableDeclarationsInspector).GetField("adaptor", BindingFlags.Instance | BindingFlags.NonPublic); + private static readonly FieldInfo NewNameField = typeof(VariableDeclarationsInspector).GetField("newName", BindingFlags.Instance | BindingFlags.NonPublic); + private static readonly MethodInfo AdaptorFieldMethod = typeof(MetadataCollectionAdaptor).GetMethod("Field", BindingFlags.Instance | BindingFlags.Public); + private static readonly FieldInfo listControlFieldInfo = typeof(MetadataCollectionAdaptor).GetField("listControl", BindingFlags.NonPublic | BindingFlags.Instance); + + private static readonly IOptimizedInvoker adaptorFieldMethodInvoker; + internal static readonly IOptimizedAccessor adaptorFieldAccessor; + private static readonly IOptimizedAccessor newNameFieldAccessor; + + static PatchedVariableDeclarationsInspector() + { + adaptorFieldMethodInvoker = AdaptorFieldMethod.Prewarm(); + adaptorFieldAccessor = AdaptorField.Prewarm(); + newNameFieldAccessor = NewNameField.Prewarm(); + } + + public PatchedVariableDeclarationsInspector(Metadata metadata) : base(metadata) { } + + public override void Initialize() + { + base.Initialize(); + + var adaptor = (MetadataListAdaptor)adaptorFieldAccessor.GetValue(this); + + if (listControlFieldInfo != null) + { + listControl = listControlFieldInfo.GetValueOptimized(adaptor) as ReorderableListControl; + + if (listControl != null) + { + listControl.Flags = ReorderableListFlags.HideAddButton | ReorderableListFlags.DisableContextMenu; + listControl.AddMenuClicked += (sender, args) => + { + LudiqGUI.FuzzyDropdown(args.ButtonPosition, GetOptions(), typeof(object), (option) => + { + addedDeclaration = Add(OperateOnString(NewVariableString), option as Type); + addedItem = true; + }); + }; + } + } + } + + private IFuzzyOptionTree GetOptions() => new TypeOptionTree(Codebase.GetTypeSet(TypeSet.SettingsTypes), TypeFilter.Any); + + public VariableDeclaration Add(string name, Type type) + { + var adaptor = (MetadataListAdaptor)adaptorFieldAccessor.GetValue(this); + + newNameFieldAccessor.SetValue(this, name); + adaptor.Add(); + GUI.changed = true; + + var collection = metadata["collection"]; + var newElement = collection[collection.Count - 1]; + newElement["name"].value = name; + newElement["value"].value = type.PseudoDefault(); + + var declaration = (VariableDeclaration)newElement.value; +#if VISUAL_SCRIPTING_1_7 + newElement["typeHandle"].value = new SerializableType(type.AssemblyQualifiedName); +#endif + return declaration; + } + + private string OperateOnString(string requestedName) + { + var declarations = metadata.value as VariableDeclarations; + string baseName = string.IsNullOrEmpty(requestedName) ? "Unnamed Variable" : requestedName; + string resolvedName = baseName; + + int counter = 1; + while (declarations.IsDefined(resolvedName)) + { + resolvedName = $"{baseName} ({counter++})"; + } + + return resolvedName; + } + + protected override float GetHeight(float width, GUIContent label) + { + float height = base.GetHeight(width, label); + + if (EditorPrefs.GetBool(ProjectSettingsProviderView.ShowVariablesQuickbarKey, false) && !metadata.HasAttribute()) + { + height += (Layout.ButtonHeight * 2) + Layout.ButtonSpacingY + (Layout.ToolbarPadding * 2); + } + + return height + Layout.TitleHeight; + } + + protected override void OnGUI(Rect position, GUIContent label) + { + if (metadata.value == null) return; + + position.x = 0; + + if (EditorPrefs.GetBool(ProjectSettingsProviderView.ShowVariablesQuickbarKey, false) && !metadata.HasAttribute()) + { + DrawQuickAddToolbar(position); + + float offset = (Layout.ButtonHeight * 2) + Layout.ButtonSpacingY + (Layout.ToolbarPadding * 2); + position.y += offset; + position.height -= offset; + } + + position.height = base.GetHeight(position.width, label) + 20; + + adaptorFieldMethodInvoker.Invoke(adaptorFieldAccessor.GetValue(this), position, new GUIContent("Variables")); + } + + private static readonly GUIContent[] quickTypesLabels = + { + new GUIContent("Float", typeof(float).Icon()[IconSize.Small], QuickTypeTooltip), + new GUIContent("Int", typeof(int).Icon()[IconSize.Small], QuickTypeTooltip), + new GUIContent("Bool", typeof(bool).Icon()[IconSize.Small], QuickTypeTooltip), + new GUIContent("String", typeof(string).Icon()[IconSize.Small], QuickTypeTooltip), + new GUIContent("Vector", typeof(Vector4).Icon()[IconSize.Small], QuickTypeTooltip), + new GUIContent("Color", typeof(Color).Icon()[IconSize.Small], QuickTypeTooltip), + new GUIContent("Object", typeof(GameObject).Icon()[IconSize.Small], QuickTypeTooltip), + new GUIContent("Other", typeof(Generic).Icon()[IconSize.Small], QuickOtherTypeTooltip) + }; + + private void DrawQuickAddToolbar(Rect position) + { + float totalHeight = (Layout.ButtonHeight * Layout.QuickAddRows) + Layout.ButtonSpacingY + (Layout.ToolbarPadding * 2); + Rect toolbarRect = new Rect(position.x, position.y, position.width, totalHeight); +#if DARKER_UI + EditorGUI.DrawRect(toolbarRect, CommunityStyles.backgroundColor); +#else + EditorGUI.DrawRect(toolbarRect, ColorPalette.unityBackgroundLight); +#endif + float availableWidth = toolbarRect.width - Layout.ToolbarPadding * 2; + float totalSpacingX = Layout.ButtonSpacingX * (Layout.QuickAddColumns - 1); + float buttonWidthAdjusted = (availableWidth - totalSpacingX) / Layout.QuickAddColumns; + + float xStart = toolbarRect.x + Layout.ToolbarPadding; + float yStart = toolbarRect.y + Layout.ToolbarPadding; + + for (int i = 0; i < quickTypesLabels.Length; i++) + { + int row = i / Layout.QuickAddColumns; + int col = i % Layout.QuickAddColumns; + + float x = xStart + col * (buttonWidthAdjusted + Layout.ButtonSpacingX); + float y = yStart + row * (Layout.ButtonHeight + Layout.ButtonSpacingY); + + Rect buttonRect = new Rect(x, y, buttonWidthAdjusted, Layout.ButtonHeight); + + if (DrawAddButton(buttonRect, quickTypesLabels[i], out var mouse)) + { + bool isRight = mouse == MouseButton.Right; + string typeLabel = quickTypesLabels[i].text; + + if (typeLabel == "Bool") + { + AddQuickVariable(isRight ? typeof(List) : typeof(bool), true); + continue; + } + if (typeLabel == "Other") + { + TypeBuilderWindow.ShowWindow(buttonRect, (t) => AddQuickVariable(t, Event.current.shift), typeof(object), true, Array.Empty()); + continue; + } + + var menu = new GenericMenu(); + switch (typeLabel) + { + case "Float": + menu.AddItem(new GUIContent("float"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(float), true)); + menu.AddItem(new GUIContent("double"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(double), true)); + menu.AddItem(new GUIContent("decimal"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(decimal), true)); + break; + + case "Int": + menu.AddItem(new GUIContent("int"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(int))); + menu.AddItem(new GUIContent("short"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(short), true)); + menu.AddItem(new GUIContent("long"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(long), true)); + menu.AddItem(new GUIContent("byte"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(byte), true)); + menu.AddItem(new GUIContent("sbyte"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(sbyte), true)); + menu.AddSeparator(""); + menu.AddItem(new GUIContent("uint"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(uint), true)); + menu.AddItem(new GUIContent("ushort"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(ushort), true)); + menu.AddItem(new GUIContent("ulong"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(ulong), true)); + break; + + case "String": + menu.AddItem(new GUIContent("String"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(string))); + menu.AddItem(new GUIContent("Char"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(char), true)); + break; + + case "Vector": + menu.AddItem(new GUIContent("Vector 2"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Vector2), true)); + menu.AddItem(new GUIContent("Vector 3"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Vector3), true)); + menu.AddItem(new GUIContent("Vector 4"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Vector4), true)); + menu.AddSeparator(""); + menu.AddItem(new GUIContent("Vector 2 Int"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Vector2Int), true)); + menu.AddItem(new GUIContent("Vector 3 Int"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Vector3Int), true)); + break; + + case "Color": + menu.AddItem(new GUIContent("Color"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Color))); + menu.AddItem(new GUIContent("HDRColor"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(HDRColor), true)); + menu.AddItem(new GUIContent("Gradient"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Gradient), true)); + break; + + case "Object": + menu.AddItem(new GUIContent("Game Object"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(GameObject))); + menu.AddItem(new GUIContent("Transform"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Transform))); + menu.AddSeparator(""); + menu.AddItem(new GUIContent("Physics/Rigid Body"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Rigidbody), true)); + menu.AddItem(new GUIContent("Physics/Rigid Body 2D"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Rigidbody2D), true)); + menu.AddItem(new GUIContent("Physics/Collider"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Collider), true)); + menu.AddItem(new GUIContent("Physics/Collider 2D"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Collider2D), true)); + menu.AddItem(new GUIContent("Physics/Box Collider"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(BoxCollider), true)); + menu.AddItem(new GUIContent("Physics/Box Collider 2D"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(BoxCollider2D), true)); + menu.AddItem(new GUIContent("Physics/Sphere Collider"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(SphereCollider), true)); + menu.AddItem(new GUIContent("Physics/Circle Collider"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(CircleCollider2D), true)); + menu.AddSeparator(""); + menu.AddItem(new GUIContent("Rendering/Mesh Renderer"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(MeshRenderer), true)); + menu.AddItem(new GUIContent("Rendering/Camera"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Camera), true)); + menu.AddSeparator(""); + menu.AddItem(new GUIContent("Audio Source"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(AudioSource), true)); + menu.AddItem(new GUIContent("Animator"), false, () => AddQuickVariable(isRight ? typeof(List) : typeof(Animator), true)); + break; + } + menu.DropDown(buttonRect); + } + } + } + + private static GUIStyle _labelStyle; + private static GUIStyle labelStyle + { + get + { + if (_labelStyle == null) + { + _labelStyle = new GUIStyle(EditorStyles.label) + { + border = new RectOffset((int)Layout.CornerRadius, (int)Layout.CornerRadius, (int)Layout.CornerRadius, (int)Layout.CornerRadius), + padding = new RectOffset(4, 4, 2, 2), + alignment = TextAnchor.MiddleLeft, + normal = { textColor = !EditorGUIUtility.isProSkin ? Color.black : Color.white } + }; + } + return _labelStyle; + } + } + + private static bool DrawAddButton(Rect rect, GUIContent content, out MouseButton? mouseButton) + { + var e = Event.current; + bool containsMouse = e != null && rect.Contains(e.mousePosition); + bool isClick = containsMouse && e.type == EventType.MouseDown && e.button == 0; + bool isRightClick = containsMouse && e.type == EventType.MouseDown && e.button == 1; + + var previous = EditorGUIUtility.GetIconSize(); + EditorGUIUtility.SetIconSize(new Vector2(16, 16)); + + var color = Color.gray.Brighten(0.1f); + if (isClick || isRightClick) color = CommunityStyles.backgroundColor; + else if (containsMouse) color = CommunityStyles.backgroundColor.Brighten(0.3f); + + LudiqGUI.DrawEmptyRect(rect, color); + EditorGUI.LabelField(rect, content, labelStyle); + EditorGUIUtility.SetIconSize(previous); + + var texRect = new Rect(rect.xMax - 14, rect.y + 9, EditorGUIUtility.isProSkin ? 8 : 10, 10); + GUI.DrawTexture(texRect, ReorderableListResources.GetTexture(ReorderableListTexture.Icon_Add_Normal)); + + if (isClick) + { + mouseButton = MouseButton.Left; + e.Use(); + return true; + } + if (isRightClick) + { + mouseButton = MouseButton.Right; + e.Use(); + return true; + } + + mouseButton = null; + return false; + } + + private static readonly string SettingsFilePath = Path.Combine("ProjectSettings", "VisualScripting_ShownTypePopups.json"); + + private static HashSet LoadSeenTypes() + { + if (File.Exists(SettingsFilePath)) + { + try + { + string json = File.ReadAllText(SettingsFilePath); + var wrapper = JsonUtility.FromJson(json); + if (wrapper?.items != null) + { + return new HashSet(wrapper.items); + } + } + catch (Exception ex) + { + Debug.LogWarning($"Failed to load shown type popups settings: {ex.Message}"); + } + } + return new HashSet(); + } + + private static void SaveSeenTypes(HashSet seenTypes) + { + try + { + var wrapper = new SerializationWrapper { items = new List(seenTypes) }; + string json = JsonUtility.ToJson(wrapper, true); + File.WriteAllText(SettingsFilePath, json); + } + catch (Exception ex) + { + Debug.LogWarning($"Failed to save shown type popups settings: {ex.Message}"); + } + } + + [Serializable] + private class SerializationWrapper + { + public List items; + } + + private void AddQuickVariable(Type type, bool ask = false) + { + string typeKey = type.AssemblyQualifiedName; + HashSet seenTypes = LoadSeenTypes(); + bool hasSeenPopup = seenTypes.Contains(typeKey); + + var coreConfig = BoltCore.Configuration; + + if (ask && !coreConfig.typeOptions.Contains(type) && !hasSeenPopup && !type.IsGenericType) + { + int choice = EditorUtility.DisplayDialogComplex( + "Add Type to Settings", + $"The type '{type.As().CSharpName(false, false, false)}' is not currently in your settings types.\n\nWould you like to add it?", + "Add", "No", "Add && Regenerate" + ); + + if (choice == 0 || choice == 2) + { + coreConfig.typeOptions.Add(type); + SaveCoreConfig(coreConfig); + Codebase.UpdateSettings(); + if (choice == 2) UnitBase.Rebuild(); + } + + seenTypes.Add(typeKey); + SaveSeenTypes(seenTypes); + } + + var variableDecls = (VariableDeclarations)metadata.value; + var collection = (VariableDeclarationCollection)metadata["collection"].value; + + string baseName = type.HumanName(true); + string newVarName = baseName; + int counter = 1; + + while (variableDecls.IsDefined(newVarName)) + { + newVarName = $"{baseName} ({counter++})"; + } + + var newVar = new VariableDeclaration(newVarName, Default(type)); +#if VISUAL_SCRIPTING_1_7 + newVar.typeHandle = new SerializableType(type.AssemblyQualifiedName); +#endif + collection.Add(newVar); + metadata.RecordUndo(); + SetHeightDirty(); + } + + private object Default(Type type) + { + if (type == typeof(Gradient)) return new Gradient(); + + return type.PseudoDefault(); + } + + private void SaveCoreConfig(BoltCoreConfiguration coreConfig) + { + var meta = coreConfig.GetMetadata(nameof(coreConfig.typeOptions)); + meta.Inspector().SetHeightDirty(); +#if VISUAL_SCRIPTING_1_9_0_OR_GREATER + meta.GetType().GetMethod("SaveImmediately", BindingFlags.Instance | BindingFlags.NonPublic).InvokeOptimized(meta, new object[] { true }); +#else + meta.Save(); +#endif + } + } +} \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Inspectors/Variables/PatchedVariableDeclerationsInpsector.cs.meta b/Editor/Nodes/Fundamentals/Inspectors/Variables/PatchedVariableDeclerationsInspector.cs.meta similarity index 100% rename from Editor/Nodes/Fundamentals/Inspectors/Variables/PatchedVariableDeclerationsInpsector.cs.meta rename to Editor/Nodes/Fundamentals/Inspectors/Variables/PatchedVariableDeclerationsInspector.cs.meta diff --git a/Editor/Nodes/Fundamentals/Inspectors/Variables/VariableFoldout.cs b/Editor/Nodes/Fundamentals/Inspectors/Variables/VariableFoldout.cs deleted file mode 100644 index fb4acc8e..00000000 --- a/Editor/Nodes/Fundamentals/Inspectors/Variables/VariableFoldout.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Unity.VisualScripting.Community -{ - public class VariableFoldout - { - public string name; - public bool isExpanded; - public double? hoverStartTime; - public VariableFoldout(string name, bool expanded) { this.name = name; this.isExpanded = expanded; } - } -} \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Inspectors/Variables/VariableFoldout.cs.meta b/Editor/Nodes/Fundamentals/Inspectors/Variables/VariableFoldout.cs.meta deleted file mode 100644 index b58dc9cb..00000000 --- a/Editor/Nodes/Fundamentals/Inspectors/Variables/VariableFoldout.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 05ada80a9dc67ba4babca8296ab5b3e6 \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Inspectors/Vector2IntInspector.cs b/Editor/Nodes/Fundamentals/Inspectors/Vector2IntInspector.cs index 1fb9f38f..49d9ca07 100644 --- a/Editor/Nodes/Fundamentals/Inspectors/Vector2IntInspector.cs +++ b/Editor/Nodes/Fundamentals/Inspectors/Vector2IntInspector.cs @@ -4,28 +4,60 @@ namespace Unity.VisualScripting.Community { [Inspector(typeof(Vector2Int))] - public class Vector2IntInspector : Inspector + public class Vector2IntInspector : VectorInspector { public Vector2IntInspector(Metadata metadata) : base(metadata) { } - protected override float GetHeight(float width, GUIContent label) - { - return EditorGUIUtility.singleLineHeight; - } - protected override void OnGUI(Rect position, GUIContent label) { var value = (Vector2Int)metadata.value; BeginBlock(metadata, position); - var newValue = EditorGUI.Vector2IntField(position, label, value); + Vector2Int newValue; + + if (position.width <= Styles.compactThreshold) + { + newValue = CompactVector2IntField(position, GUIContent.none, (Vector2Int)metadata.value); + } + else + { + newValue = EditorGUI.Vector2IntField(position, label, value); + } + if (EndBlock(metadata)) { metadata.RecordUndo(); metadata.value = newValue; } } + + public static Vector2Int CompactVector2IntField(Rect position, GUIContent label, Vector2Int value) + { + position = EditorGUI.PrefixLabel(position, label); + + float totalSpacing = LudiqStyles.compactHorizontalSpacing; + float elementWidth = (position.width - totalSpacing) / 2f; + + var xPosition = new Rect( + position.x, + position.y, + elementWidth, + EditorGUIUtility.singleLineHeight + ); + + var yPosition = new Rect( + xPosition.xMax + LudiqStyles.compactHorizontalSpacing, + position.y, + elementWidth, + EditorGUIUtility.singleLineHeight + ); + + return new Vector2Int( + LudiqGUI.DraggableIntField(xPosition, value.x), + LudiqGUI.DraggableIntField(yPosition, value.y) + ); + } } } \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Inspectors/Vector3IntInspector.cs b/Editor/Nodes/Fundamentals/Inspectors/Vector3IntInspector.cs index 1cdbcf6c..67f198f4 100644 --- a/Editor/Nodes/Fundamentals/Inspectors/Vector3IntInspector.cs +++ b/Editor/Nodes/Fundamentals/Inspectors/Vector3IntInspector.cs @@ -4,28 +4,68 @@ namespace Unity.VisualScripting.Community { [Inspector(typeof(Vector3Int))] - public class Vector3IntInspector : Inspector + public class Vector3IntInspector : VectorInspector { public Vector3IntInspector(Metadata metadata) : base(metadata) { } - protected override float GetHeight(float width, GUIContent label) - { - return EditorGUIUtility.singleLineHeight; - } - protected override void OnGUI(Rect position, GUIContent label) { var value = (Vector3Int)metadata.value; BeginBlock(metadata, position); - var newValue = EditorGUI.Vector3IntField(position, label, value); + Vector3Int newValue; + + if (position.width <= Styles.compactThreshold) + { + newValue = CompactVector3IntField(position, GUIContent.none, (Vector3Int)metadata.value); + } + else + { + newValue = EditorGUI.Vector3IntField(position, label, value); + } + if (EndBlock(metadata)) { metadata.RecordUndo(); metadata.value = newValue; } } + + public static Vector3Int CompactVector3IntField(Rect position, GUIContent label, Vector3Int value) + { + position = EditorGUI.PrefixLabel(position, label); + + float totalSpacing = LudiqStyles.compactHorizontalSpacing * 2; + float elementWidth = (position.width - totalSpacing) / 3f; + + var xPosition = new Rect( + position.x, + position.y, + elementWidth, + EditorGUIUtility.singleLineHeight + ); + + var yPosition = new Rect( + xPosition.xMax + LudiqStyles.compactHorizontalSpacing, + position.y, + elementWidth, + EditorGUIUtility.singleLineHeight + ); + + var zPosition = new Rect( + yPosition.xMax + LudiqStyles.compactHorizontalSpacing, + position.y, + elementWidth, + EditorGUIUtility.singleLineHeight + ); + + return new Vector3Int( + LudiqGUI.DraggableIntField(xPosition, value.x), + LudiqGUI.DraggableIntField(yPosition, value.y), + LudiqGUI.DraggableIntField(zPosition, value.z) + ); + } } } \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Resources/Align.png b/Editor/Nodes/Fundamentals/Resources/Align.png index e5a80dac7dce69e30f1d2f22eb7dfe2914db0ab2..27f8eb0a6161bf16b95922f19f60f93f89a92170 100644 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^0w65F1|d{4fA$!wo3Ta9dJ&#!pN{&&+5y2<~344=P-D>`njxgN@xNA D&bvZU literal 1897 zcma)7X;c$e6rO+uf(7*$5tB;Cr5%xG8lw9=E`&h0KhFGJT!*dLEGcvM6HIbtU+p{>%vzU0Kol}?V)Y;ac2R5qe2yzNG3+U zjbPez4vK5#1jm%FqtE~#S!mLsSQ#Dq`;=>&;_rgXK&fS9C^ofo0rZEh|^f%Lcni3trGgHV$`M%Wo_L1QE#dIBX0JOJjwLN=ezhWQfiKaOlUo(C*4 zkr8+R=8vMd+|Q5A7l;YA0GEr{Vg;Ya7Wl)sP{@b<1ajdx(P+raG+}azMFf8Kb2{qSXcoYsgbZKVXj{iAjMz3rX_<}6|Un(3M zmq};TtL-g-V_ZT_q!Sv_CK7*4BpgFX6{#kkOBAFgUzUjKJw%OaQl*fIjS~vgs3xI+ zc#S;_2j__dpb4ZFoyi+ygOo1+DsPNY!hIpxe-tHIZN}-nvi+Uj&n9xN77EhKMc!NH7bxOGOY;{5 z9ST?`Q(Y>qn%1A^Qhlvqz`0?HY*<-!Bkl4%OTv(Oli`B3^_I`)N8Dw-Ys+^uruIr7 zUpzIiIw_LHWIl9qcAj(Y_5ivoIy?}1J0$=5b#zm06|i^TK6=yo>+@T>S|2}=!f;zs zw<0AarK!Sfwr0=^qe4F25b#R2!|}d-tMZkN(_L~o+x9l+Fgy)I@0_JoEY;RAawScP zHG!Yt@D8AGfiB76mpReX8JjoICa1QaBxV`DP<>rc%D~-9F77-+SIgxmrhZjiVpwkskY&fb2Z4()Naeo33>QBt<5+Gp#Mo_cKEPKQfZ$`UY| zu9TI#lvyIHY*EbE**D>{{!+`2T?HeC?&5wYeWl^mQ_F!rKXL?;i)v}uB!aZSPT$U+ zyx5vo8kj@}n=cIx4Yf|~0_$ZD=|92NykL(jG+u{t7q{|#hu@ffR#Q&SaoTV&zX}?R_*M<>J|M#zFVN*_OWkH6;1XdG|N;Q$_SG zoaGzZ_|npzyLbDeeNKb{_?^mvrdd^5(EsiXWaYF2lNf8cA4K1l0sd3od+POY;tBEV zvt(b-t&RWCJYOjocBoYh)Gd6Rn75H*F1d59;5)Y!fjP<9d)qSWZ=fd`e|*Y&^RX3<_SB0l|I5b|p-_v6q z-ksb2b5ZbT=d6KXyZ+!Yy7PSaiby1~l)rg8FLM>Ri!rz;xH~Xd;=3lVv+w?p3|Y-Y zjJcAXH`jXXJIWE=>Cnv79m{R=s$sC4nbT%#b_-;d$Jj*LnX;MQW$De{omK49MLD3m zdD*SCg~`hgA1pSn$P`^0!IJXC3Dz?D_+V+Ee`G zOUEgIkAG}zY%8;SbH&Vd2$COr{Ud+>^d+Y;OK0@=$t@j{aPt+{n{*7pylRuKj#P-4 zx2^id@6XkcWv}IPLfk_(`s_XPmf*0M<$I!~KeFc6u&Vm{j@WhjJ?q1E2M;-Rdq;IP zmur6xG+Ppb4tkMI50aJV13a&_Kp&4Z470PRyxYBXe@1eAD{tL{zZ}THQ&&AEC0} zIEHw5C+{hcWBLC-y@4rFR3If~%2QUy85(ah)NV=o&N=CPoUz}&S)p*BlB=llIui!t zCvRm1T$Tt1@f=?!X4}hKA+q7YC&4Vegp?&$p6~d=U%}C1#gH!5kZPS&%(zqaMT7gn i3_Xbt8WIKU3=HQ!>MXxEWyf`(-3*?telF{r5}E+T?>s*M literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/Align@Pro.png b/Editor/Nodes/Fundamentals/Resources/Align@Pro.png index ba029f48d7aa7db977f093e67b91278e0e5d76e2..10e59f6a3d765c40f0677095b264ab62a79a370c 100644 GIT binary patch literal 181 zcmeAS@N?(olHy`uVBq!ia0vp^0w65F1|F@Qd?&3MU-Q54f1mE{HHGk#ShPBC+MDtxk(YuH%G>g2(>XNwEC? zzdS7D;F;&P3{5;d%yO(ei+46e6?(6;WS+-XV8t-)?S;!6dUiW+mK<+tIX_n~F(p4KRj(qq0H~UQ!N$I#ATc>RwL~E)H9a%WR{j0%{pt#tDYok2 zroINg1Es~{IQs1hL0Rz0Jnq`*pFzr4I$uiRKKzbIYb(9+UU-@r)U$VeBcLbtdw zuOzWTH?LS3Xabi4*bJA{;^d;tf|AVqJOz-MiAnjTCARA7TnbR59ZO1zGLzt@=N0QE zf<;O}TJ(UP)=x|+);H8M069xR!3Lt<$}y!F#D!QAoLUIxKzKQsV4DgOi;7c2DhpC= z)q_%t^Gl18Q^6*HG(inMfN9SvCowPGR=q+u zB{eOvG^a$}E;J9UEkz+EwKy|9PeE4!7$X=SgPLWdk7NxNZ$X5Bi5Qri_2G#g$bn~@ z)I4BbDFSASAN5-m85o!rdb&7-yWIaQ=GLz>im_r*55SDcWsz#T)KSM z>R)$WU9R07^6UP;tzu3IA&rXdU0=n07rZ%P(50xzdHb!IzX_uao19>tai_PsLw>pX zlkJ7l(JYLI-5)R)1Q*8M|Hr=J#p(;`JFP-xr#Of@rf;}BvE_Z^*N**XZY?-@dd+eb zCJv#m=8ctKV;8DaA6Vu4$|Tut_LSeJPqJ)bT7E$0@AiFc^R8>G6x_}BU-(A;hV~6@ z;s-cFmFF|~UQ%SZt?KYZia~h8zILq((>rR}b~9YL67IdqiHq@vE#vBjAK#R3ML3<= z`1Ayak&?>n4bBdpg{_87mE*kos)HKrP7(z4$~c$F!4&I z?-Eore`zng;>YCvi)Su22t;%qS^MhKl$f3;77sVdXxj%Z%1z*2!JOaVD|)_X+Cz&1y^%?g@rgJJ8YS(d^sBLEHkqf-xcu?uhcJ3zOgHPC4?TMNd!#zgxhUgEyhx!=rH$IMr7H=o#embwWfxjTU%Rn{vj;^&u8*^ z4>?+1raw=(d3Sea+B5d>zo!>{`%<>ua^2)#)*C;I|5@|BdHMAxt9zJxzHijsXqD9V ze{=D{cEu(O6YZm1zl-PCuXlgRBNwgzP=8Nevi`+?BJJB{&MZ$`E%0bp2gAN%qyOqH zzne|o--%KF&cMZfK=WeQ42HLLJFSHe7+)G-=5B=t=TdidaVRWv>%L{MaNX@wk!N4q zoaLMUQFr;pn;nl@Za&PLB`f#vDBJ3}oScC_+?RatcBnFNvp!tev-D5-jD1Ttf~#eWT(5;L;x^di0~uOh`<0gB#9$| zLWuw-DdVIV8UVa}lu{5{38Odx9D|5CgqLNN1RNsd5Ee25DS^^ia4a%UC4<9ML3~KH z5@HDnKHipIN;W1C2csZP87C6U*-8$`?BUK?r7X2(c(CWs}K? ziHW2{I!PjnAyZi_7MVgL(`ZBtL6ol&qo9%~mOEn#mN=sZ7nVaZM2aF3G0va~3M2}Y zLm*h<2BrN_RE7wK)WvcVX!Ixy6cQFR85GLNR1(GTTR5E80G{n9lpD-}O~T-KqcLEK z5aUi#P$q}@tE4c85DLpB3K;|&6%3?7ky$brL}8&fjY4A(sZ=6`nn<^Mv3j{WI>~^w0&~uC;H;b3q*Q8q#gu)sE_7H=?r3$;qi* zui3Bb8t;=Duo>S>6Z;OO429S0_cdTR5Unp)qzUKO3SB0s98seHp{ zE7PJ2ANzAN6RqAjbTd~q$H-1MZm7&F)7QtWX(<^of{?HrIc+z-#iGRe{lOXjXEF}C zEL!dU!;7l(iLI9$lE${(YtXnC>pN|e&!e;~C)K#3(X;UDZroemvk~ z4(;dze~b8>R~;@{m)_m{VX6(U;LeKom$oeCmEg-mr&QHf6p!63Z~pjF8?W`dr83`c z-JgcTlh$t=WASOX>yvHSHp-OLv{tv!ls?z2WHp=mS)j>zRwLTRVqVeA3%xS=G%?Z&Wm- zTJlDWD`>phTXG4SC^q>v=F=hbvGi1fUES!AxH yJ@bH6=pb9&)>|vFvEXL2`Xha_T|;K>>I!}k^hTU9Y@eCo?&Zx6;uiWZSN{zgdmbME diff --git a/Editor/Nodes/Fundamentals/Resources/BlueNode.png~ b/Editor/Nodes/Fundamentals/Resources/BlueNode.png~ new file mode 100644 index 0000000000000000000000000000000000000000..405e59a64ad07d3b9d2158c1ac0829be6bd1b996 GIT binary patch literal 451 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|R5J zr;B4qMcmujhFMI35-sIduL<99`^Y9{*^(e0lx0%x@m6usqOgNrCk%rs7`C3{%n>!N zzrpUU;A5XJCii~t-ORLS&1?T{T4CG#H?{Nil7D`0YFg*Ny}sh_q?)OP4IkZeve(R; z@$mnfIUgT#I?6;%O={jN{rvsU0ITM6x6^-cuit&cd&~d6!zS#XSKicW*|AQkq1x}+ z|CWMmkI(1MnilgfC}5Z)l-tUA;obDz#*8+~1I^@S%8OaHx`QDpYs(5=;a9uX&bhir z@A8`uocD{Q=Jsmz&5(V!{N}^-JwFaqooH#%_+uLMLsh|6VsY#Pn`1%$taUE@(W(5$ ZXtCA!Q}n#VK47dcc)I$ztaD0e0stfA#U20v literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/BlueNode@Pro.png b/Editor/Nodes/Fundamentals/Resources/BlueNode@Pro.png index 7d41b7248266f248008f07aa063cb0579ecadfdd..405e59a64ad07d3b9d2158c1ac0829be6bd1b996 100644 GIT binary patch literal 451 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|R5J zr;B4qMcmujhFMI35-sIduL<99`^Y9{*^(e0lx0%x@m6usqOgNrCk%rs7`C3{%n>!N zzrpUU;A5XJCii~t-ORLS&1?T{T4CG#H?{Nil7D`0YFg*Ny}sh_q?)OP4IkZeve(R; z@$mnfIUgT#I?6;%O={jN{rvsU0ITM6x6^-cuit&cd&~d6!zS#XSKicW*|AQkq1x}+ z|CWMmkI(1MnilgfC}5Z)l-tUA;obDz#*8+~1I^@S%8OaHx`QDpYs(5=;a9uX&bhir z@A8`uocD{Q=Jsmz&5(V!{N}^-JwFaqooH#%_+uLMLsh|6VsY#Pn`1%$taUE@(W(5$ ZXtCA!Q}n#VK47dcc)I$ztaD0e0stfA#U20v literal 2078 zcma)-3s4hR7sr=}Jfc9TmI_o7ztBc&!)6l_NG1ud@EQdLLJ>hB*=$TCFOm(3yd~m*Jk1lkOi83*loW@9?Ca9wj zsVpvEgQVmq3gG-4m?b8M@o*di8v`g1R7f-^PMy5t( zDkagz6pB;OcPOpnV}&R5gbgXKum-wVju`DB$&Dgnh$v$6C=VX z3>t&RWU!!MD1^lbeHmb%d|fY4>0qfX6&`Jo`_gCEazNYe%4PGLVmB6cWieuY%jSiz zl;z)-N(?WSNv+e!?JXdNK}3!y5G86W60}exG0a9~s2q7&q6j(qdWo>!W6Oog?Od{f zB1R-aog5|eXd>H1q!6LM$!7t<0bim2O*Zo`taq_41{ZrBGZs$^qQs7f20IJVt?k7C z;H-$}M+gkH6N6dul+?FfC+k*O$h{UabM#iPZoI8^SgCr%J<8fd^6Hz+-Xx$!T`_w3 z&25Md^!|XLe#2PSFROxLTq_PF&U7p8I=_>+VtKFgPj%%{7T{a)vmfdPXP$9J^M;L& zB}aak;1mviBKv4$c4%spH$<>z6gy6QbvCne{R!h^75=Y(ed|7F;~rj+++dD% zGjFzdpZEMNj8z&pxc5-8hO2FU^wygEInw5Hr`WQ7v)^*OWSr4YiaqM< zFd{$-SC(rDTo8La16x_`2jE-DjZNBHz^Lx>7-i zx&s~QxkBMl^R}&A(KnLy+X~X2C4JVbBmZf*x=$a_H}b$_f~MY?#7)+BTQ7a|T~|b5 zr~Im^_WB=A)@$98Ed#DC-!H8&m+ZdG0%s51111w-Z1zl5Zt2Cg4F$4hMbYJr7iSLn zI#-==@C*-J(!=}}xEl(5hX-nF92BHC!X4uPccMdJsdE+Zx{*C*s{V`XAH+5MQs22V zlh*-!!t&PqEwwXlrT(X_=oY7{{l3&6L89MjQIzm5SdrIde)wK*^8M-WpLyXkV987|OpdVR;R|LtvqJ90o}OK02K%F65UfvNh`##NaYzVR%Y zh9l+qK3Pw?noLiZru7eb8=9TYd;E8++8?McGNof3yru|l4Jh}V?rGvD$GI=d-6j$J zV$$~p4<8*{69T7!R^4X}KC2_M6X@12!oHk7xY5zDe$?r)*KAVFn`a*E-SZ8;Y}^aq z)N)hW{<<{5fg8DWK`1xvPl{4=`sgOt;hVJ3_rm YoO))C0kz)7e%l{BK01-#6q#N2C!_>600000 diff --git a/Editor/Nodes/Fundamentals/Resources/BlueNode@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/BlueNode@Pro.png.meta index 053e8d0e..6a7bf353 100644 --- a/Editor/Nodes/Fundamentals/Resources/BlueNode@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/BlueNode@Pro.png.meta @@ -24,7 +24,7 @@ TextureImporter: heightScale: 0.25 normalMapFilter: 0 flipGreenChannel: 0 - isReadable: 0 + isReadable: 1 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 diff --git a/Editor/Nodes/Fundamentals/Resources/BlueNode@Pro.png~ b/Editor/Nodes/Fundamentals/Resources/BlueNode@Pro.png~ new file mode 100644 index 0000000000000000000000000000000000000000..ef43c588fbdfbc34329a39722abf07bb30529497 GIT binary patch literal 446 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|R4$ zr;B4qMcmujwq8dPL|lcpipI2bS#Ky1FH5rgcV<$F+ZC@hciNBYINWVXc)j2|?@tAe zqTiFP1wN@(p56KVK*;*{Zu=ikU%ymN|JeJ4=lLIP_RV`2XSQx1ACvvXw{h1Md4AZ> z;jgs_7Fazu@sZ>AW~=&pF$;}v%+~K(A2I*+z14rCWzDXX{J8c;z{&PrD1&`)(|_SZ zRoriPx8I&u#SqK%VcG`uB!=Db{^HCvZf`mz4!pa5`6$DD!D=P84ZpvZ7#>JJGOvU2 zO`UBl&j-nkv{V|-w&t%y`68wjYcJ+)@j0bP0 Hl+XkKs_e<~ literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/Branch_And.png.meta b/Editor/Nodes/Fundamentals/Resources/Branch_And.png.meta index 804cb46f..21ce6d6f 100644 --- a/Editor/Nodes/Fundamentals/Resources/Branch_And.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/Branch_And.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 41e4cdb209a3b5844920950cab1a48f2 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -1779779268800075709 + second: Branch_And_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: Branch_And_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 34821984f24fc47e0800000000000000 + internalID: -1779779268800075709 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/Branch_And@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/Branch_And@Pro.png.meta index 66fad5c8..98591f80 100644 --- a/Editor/Nodes/Fundamentals/Resources/Branch_And@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/Branch_And@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: c4ee510e6ce59574cb2fd0dc3d5c28ac TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 8433287221034758638 + second: Branch_And@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: Branch_And@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ee13e9acb0e090570800000000000000 + internalID: 8433287221034758638 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/Branch_Equal.png.meta b/Editor/Nodes/Fundamentals/Resources/Branch_Equal.png.meta index 47491bdf..157e5bef 100644 --- a/Editor/Nodes/Fundamentals/Resources/Branch_Equal.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/Branch_Equal.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 5325db33bc788a847a02f7c2a0dd2284 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 8069040108011092611 + second: Branch_Equal_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: Branch_Equal_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 38a71640a3dfaff60800000000000000 + internalID: 8069040108011092611 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/Branch_Equal@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/Branch_Equal@Pro.png.meta index 606b458b..eaf00e2c 100644 --- a/Editor/Nodes/Fundamentals/Resources/Branch_Equal@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/Branch_Equal@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 4e578341c3d6dae47984528c2befdf6e TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -8786634562288884009 + second: Branch_Equal@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: Branch_Equal@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 7d6e99f4b6a9f0680800000000000000 + internalID: -8786634562288884009 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/Branch_Greater.png.meta b/Editor/Nodes/Fundamentals/Resources/Branch_Greater.png.meta index eb31bb25..afb54342 100644 --- a/Editor/Nodes/Fundamentals/Resources/Branch_Greater.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/Branch_Greater.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 0216448bfa3c59a4280cbbfcfa8becdd TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -6398303727221698234 + second: Branch_Greater_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: Branch_Greater_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 64194e5e8a8a437a0800000000000000 + internalID: -6398303727221698234 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/Branch_Greater@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/Branch_Greater@Pro.png.meta index e1f61642..8d036eeb 100644 --- a/Editor/Nodes/Fundamentals/Resources/Branch_Greater@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/Branch_Greater@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 67fdcc0997c74f94c88d7a4537a97548 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 8850959077054922427 + second: Branch_Greater@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: Branch_Greater@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: bbeb06dd26ce4da70800000000000000 + internalID: 8850959077054922427 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/Branch_Greater_Equal.png.meta b/Editor/Nodes/Fundamentals/Resources/Branch_Greater_Equal.png.meta index 9b7b6852..7df8d03e 100644 --- a/Editor/Nodes/Fundamentals/Resources/Branch_Greater_Equal.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/Branch_Greater_Equal.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 8decbd53327d91d428f8faec3e796f47 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 2154258476637647736 + second: Branch_Greater_Equal_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: Branch_Greater_Equal_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 8737c56bba675ed10800000000000000 + internalID: 2154258476637647736 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/Branch_Greater_Equal@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/Branch_Greater_Equal@Pro.png.meta index 55af3393..01cba52c 100644 --- a/Editor/Nodes/Fundamentals/Resources/Branch_Greater_Equal@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/Branch_Greater_Equal@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: b497811870be5094ba24b63756468679 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 5235735447084793950 + second: Branch_Greater_Equal@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: Branch_Greater_Equal@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e50096526a119a840800000000000000 + internalID: 5235735447084793950 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/Branch_Less.png.meta b/Editor/Nodes/Fundamentals/Resources/Branch_Less.png.meta index ab673f04..24da1872 100644 --- a/Editor/Nodes/Fundamentals/Resources/Branch_Less.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/Branch_Less.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: de04b70930cc11847b43a241061002ee TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -2512731857809075076 + second: Branch_Less_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: Branch_Less_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c749b7730bbf02dd0800000000000000 + internalID: -2512731857809075076 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/Branch_Less@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/Branch_Less@Pro.png.meta index d745bbe3..4936ac25 100644 --- a/Editor/Nodes/Fundamentals/Resources/Branch_Less@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/Branch_Less@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 00d07e74abdf3134bb276636ff58a890 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 8682910822915480095 + second: Branch_Less@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: Branch_Less@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: f1a9540b365ef7870800000000000000 + internalID: 8682910822915480095 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/Branch_Less_Equal.png.meta b/Editor/Nodes/Fundamentals/Resources/Branch_Less_Equal.png.meta index 47857f91..7f3d45b7 100644 --- a/Editor/Nodes/Fundamentals/Resources/Branch_Less_Equal.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/Branch_Less_Equal.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 9ab9f05fc7904124b855d2a4713eaaf0 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 3523671142265371824 + second: Branch_Less_Equal_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: Branch_Less_Equal_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 0bcb5041c3896e030800000000000000 + internalID: 3523671142265371824 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/Branch_Less_Equal@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/Branch_Less_Equal@Pro.png.meta index 3ebab72d..760b2f4e 100644 --- a/Editor/Nodes/Fundamentals/Resources/Branch_Less_Equal@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/Branch_Less_Equal@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 8e4285eafc0a09f4c96aec6ecc414296 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 6779399788553766383 + second: Branch_Less_Equal@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: Branch_Less_Equal@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: fe50b1b5034451e50800000000000000 + internalID: 6779399788553766383 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/Branch_Or.png.meta b/Editor/Nodes/Fundamentals/Resources/Branch_Or.png.meta index d1fd365c..34f29c86 100644 --- a/Editor/Nodes/Fundamentals/Resources/Branch_Or.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/Branch_Or.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: d6675b4cbe0ab914d99449207fe4132f TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -507279977547992436 + second: Branch_Or_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: Branch_Or_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c8275905c87c5f8f0800000000000000 + internalID: -507279977547992436 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/Branch_Or@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/Branch_Or@Pro.png.meta index 12c0b375..884a7193 100644 --- a/Editor/Nodes/Fundamentals/Resources/Branch_Or@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/Branch_Or@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 4fc91e395e7837d4c935020d471e3fe0 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 407345041965553026 + second: Branch_Or@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: Branch_Or@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 2859f5f482e27a500800000000000000 + internalID: 407345041965553026 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/Distribute.png b/Editor/Nodes/Fundamentals/Resources/Distribute.png index bdf3a600ddf2af0a62088915048718aea52eacae..56e7c3f127c123eb86e685e7f6bd5e4844e7e53c 100644 GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^0w65F1|S?N-Smx>!EF|tTbsdSvscrZbh zW0KSdj;}gPvO+*-Q!N+SnA=wN2UFMt+Rm2)tfu6PJYAiDw5YQ^9ti) zMTa7@7S%)RDg;te{;0AyIb2jTP?4PQwqgD$1&>X&5>jrL85kOmXvN1)NNESUiow&> K&t;ucLK6Tnv_`@J literal 1309 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?4jBOuH;Rhv(mfq^+K zGbExU!q>+tIX_n~F(p4KRj(qq0H~UQ!N$I#ATc>RwL~E)H9a%WR{j0%{pt#tDYok2 zroINg1Es~{IQs1hL0Rz0Jnq`*pFzr4I$uiRKKzbIYb(9+UU-@r)U$VeBcLbtdw zuOzWTH?LS3Xabi4*bJA{;^d;tf|AVqJOz-MiAnjTCARA7TnbR59ZO1zGLzt@=N0QE zf<;O}TJ(UP)=x|+);H8M069xR!3Lt<$}y!F#D!QAoLUIxKzKQsV4DgOi;7c2DhpC= z)q_%t^Gl18Q^6*HG(inMfN9SvCowPGR=q+u zB{eOvG^a$}E;J9UEk!}Y%tWC=0Z0^7Xe#I`0OJM2dr%W?^pPyX;yH*AFew8QwLU!Q z13B=_lbQ$2F-5?vasOxbZUzR%SWg$nkcif|(|7x|IEb|Ir&(`qjlTIo%1o?b$B`y$ z6A|x&)<0Qn4wsop>CcXku#P{p!!Sz1^oRT$&ln-q*|EzC)qWmgoMbHje}X~4v{e2C zaRK8e5B?=e1OQo*+|#gOIOeg;9|&7o;*H!gz;Fi%%Mmvv4FO#l!Iz5DN}<#kY^UlqDg_7`L~&X zis=KvSCJl9Pc7na;^9fZ(MW9I&=1(vkkc?K%d6W%hki5M)A=vl_da3e`2`&{%HS)gkeJYD@<);T3K0RYH( BKt2Ef literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/Distribute@Pro.png b/Editor/Nodes/Fundamentals/Resources/Distribute@Pro.png index 211327fc08d2f89bf83f1f008592a1d3d5e0e200..3d406d29f57dc54df44d15d4207f87c77f745575 100644 GIT binary patch literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^0w65F1|sJi&A-C9r2T*wn?OpyGge17w&qd= zkE{dAE8A7Mz8q;h?XmQ;!ifV8tL$b}zWC+A*I3=A;L+HBam%DP46h=24KuGWE>?6X z<2Z4T$^;_OHKd) literal 1296 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?4jBOuH;Rhv(mfq^+K zGbExU!q>+tIX_n~F(p4KRj(qq0H~UQ!N$I#ATc>RwL~E)H9a%WR{j0%{pt#tDYok2 zroINg1Es~{IQs1hL0Rz0Jnq`*pFzr4I$uiRKKzbIYb(9+UU-@r)U$VeBcLbtdw zuOzWTH?LS3Xabi4*bJA{;^d;tf|AVqJOz-MiAnjTCARA7TnbR59ZO1zGLzt@=N0QE zf<;O}TJ(UP)=x|+);H8M069xR!3Lt<$}y!F#D!QAoLUIxKzKQsV4DgOi;7c2DhpC= z)q_%t^Gl18Q^6*HG(in4k$n`)M1sB2=Lny8zUYHF@)k!X}?WSnGRX_A%*HwdBy)fl%Vped$CrbcF_mWC#V z=9Z=w25=2vNmTVA`K8GjAg|aN!IdGzz-n#uL7|(I2?-Q12O27H9grY{C`5`D;-e}h z86HgqrA0a5B#@Gs|N%#)f2%rQm4tdYa=*o=XJF~HNsF(jh(?eyJ#Ee;}W>^INlES&0}l)U`iu}k6~ zHr7men`3fMh&!3Jg-_}o51U8NsUPx8(oK<%)8^hhWO?%VoRccWc6=&4J{*b7u?IM2 zUcCMy!o;`uNP(u|Of4~k1I#lns)_=V@p0U4R(T%}M29_MGj?TTZsJN#=|l;ptLSgSQprBl&W zfrIH;rQGJ+*(`D^4UUyNFs;AD`isw^Z?i4qs|K+POi>Qp8H~Cg_Or6hfBf6;!CK)5 z0ylz-6gKK~v&6ZnFY;HFl_=nRcR+Lp8#jkf;2f5)cN-@<$S=#>c6Y(y%*bipt5#(l zpa008#jJBGQ_|UZ<0_sjtq*6U-dxXGaQH}&!duo1$Fv@+0%kvrp9+oVyp|p?o)KKc gs1{wpe(vBw@t93#8CUzO+k(n0Pgg&ebxsLQ0AfM30RR91 diff --git a/Editor/Nodes/Fundamentals/Resources/Distribute@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/Distribute@Pro.png.meta index 8b66715c..3eff39fe 100644 --- a/Editor/Nodes/Fundamentals/Resources/Distribute@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/Distribute@Pro.png.meta @@ -5,9 +5,6 @@ TextureImporter: - first: 213: 2697913526184963604 second: Distribute@Pro_0 - - first: - 213: -7034541577598151508 - second: Distribute@Pro_1 externalObjects: {} serializedVersion: 13 mipmaps: @@ -49,7 +46,7 @@ TextureImporter: nPOTScale: 0 lightmap: 0 compressionQuality: 50 - spriteMode: 1 + spriteMode: 2 spriteExtrude: 1 spriteMeshType: 1 alignment: 0 @@ -60,7 +57,7 @@ TextureImporter: alphaUsage: 1 alphaIsTransparency: 1 spriteTessellationDetail: -1 - textureType: 2 + textureType: 8 textureShape: 1 singleChannelComponent: 0 flipbookRows: 1 @@ -75,19 +72,6 @@ TextureImporter: platformSettings: - serializedVersion: 4 buildTarget: DefaultTexturePlatform - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 4 - buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -100,7 +84,7 @@ TextureImporter: androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 4 - buildTarget: Android + buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -122,7 +106,7 @@ TextureImporter: x: 0 y: 0 width: 16 - height: 32 + height: 16 alignment: 0 pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} @@ -137,33 +121,11 @@ TextureImporter: indices: edges: [] weights: [] - - serializedVersion: 2 - name: Distribute@Pro_1 - rect: - serializedVersion: 2 - x: 15 - y: 0 - width: 15 - height: 32 - alignment: 0 - pivot: {x: 0, y: 0} - border: {x: 0, y: 0, z: 0, w: 0} - customData: - outline: [] - physicsShape: [] - tessellationDetail: -1 - bones: [] - spriteID: ca4db8da4b9406e90800000000000000 - internalID: -7034541577598151508 - vertices: [] - indices: - edges: [] - weights: [] outline: [] customData: physicsShape: [] bones: [] - spriteID: 5e97eb03825dee720800000000000000 + spriteID: internalID: 0 vertices: [] indices: @@ -174,7 +136,6 @@ TextureImporter: entries: [] nameFileIdTable: Distribute@Pro_0: 2697913526184963604 - Distribute@Pro_1: -7034541577598151508 mipmapLimitGroupName: pSDRemoveMatte: 0 userData: diff --git a/Editor/Nodes/Fundamentals/Resources/EditorWindow.png.meta b/Editor/Nodes/Fundamentals/Resources/EditorWindow.png.meta index d723d7f1..81b167b3 100644 --- a/Editor/Nodes/Fundamentals/Resources/EditorWindow.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/EditorWindow.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: e70611c7b5b2ec945bc9aacef47e4efd TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -8485257677393968811 + second: EditorWindow_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -51,7 +56,9 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 @@ -62,8 +69,10 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -73,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -85,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: EditorWindow_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 551c647691f4e3a80800000000000000 + internalID: -8485257677393968811 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -100,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/EditorWindow_Variable.png.meta b/Editor/Nodes/Fundamentals/Resources/EditorWindow_Variable.png.meta index fe437d87..c8fbd454 100644 --- a/Editor/Nodes/Fundamentals/Resources/EditorWindow_Variable.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/EditorWindow_Variable.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 97911a3e230b0074f817c88a08ae0873 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 753110343188717244 + second: EditorWindow_Variable_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -51,7 +56,9 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 @@ -62,8 +69,10 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -73,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -85,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: EditorWindow_Variable_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: cbe9f62fdd5937a00800000000000000 + internalID: 753110343188717244 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -100,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/GrayNode.png b/Editor/Nodes/Fundamentals/Resources/GrayNode.png index 1f4f2a0c4280ed8745df6639c8b5442ad0034420..da0e406ecb82c1d0dd828847e6eeb9a240cd68e3 100644 GIT binary patch delta 316 zcmV-C0mJ@|4C?}rIDY{hNkl*Qk00cn5+yM|U4*)Fy0w7@S00@`| zfEEA&5HNQD1k3|K3xEI!m^%Oh<^iAuKmY{H9RLCI0MG&;00Jq!oJ|M>VrtZN)p>UK zE(cG?W zUP)qwZeFo6&;%|8uo*6?#mPmP1tppJc?uvi6O-~wOKjEExfGyAJC>9bWhTK*&nwnT z1dEh{wCDjnt)G}utZ%4i0CJXsf(=Bym19aVhzqeKIJFSWf$(xN!8R2n78R$4R2HP# zst2VO=a&{Gr-DrYX@VN!T$GwvlA2;?WME{fYiOuzU}>X|CIzwsp~1DH#52Xt%+%c6 z!qn1C*U~82OxMIL(M;DO$tXqFJk27_*vvS|$iOfeZV*HZsxfX!KvPVOOpVM;Ee%Z! z%`HtW4B#5TlBnuK@=KF5Kwhykf-6Iafz{gRgF-ha6A~z34m4EYIv_y?QHT^R#79+1 zGCZ0JN{e#9NgyRzKQ$*cH#M&W6iJ5ANJ>ezD#%ba4!+nDchFz4ze&k)!kL+5U1hJ$R6lJ<>{6vvJ7Mysz56_DJz`J%Gk^W{mxalxpAj<0&;57U z(^0lHiuZWCz^X-;^-s^?uVr=iKEHL{60s+<+8g>hce^cS{P^{OcU93psRJigGw0kd zaPm)dxZY(|&!bXMu)t~euST1$f2TM*4+gMHw75(D;c4S%C>F>qF=FWs@_g`Y-64xs zZiBzdqWL9VYIdyxwPjx?%lI=N*y_9gz$5m91;V?}E;VC#pc(V$z3;zP;WKZ8cI*8< zq2c-U3gd4*f%vwUvoD`ztUmYd_oDm%BiWZQv?Um`I53cpK4>#|{aCf8K0G3RT3xwA z=aFiLgRei`W2|isU=#S2_NSfs$@SU?O-2k2$M!MZIHp^$E+pr*(}s^RVZ% zZR_9?nEpHM)3n}0TX$RZsSD1TGl6^it{eJNEk0!edsk;$PgHeJP1HQWQ`&5QDtpee z%lE#@+gw^)_I`fo>d@;iOKchfdnc}AOU%5o+D@-1a$9-rsn(YlCwmkhKH+P9`a)Jw zjhMW{784#h{(~;{S^u|q$9k<@>6h`XdHb6U?F+b9Xs#@cyzRQh=U3c3uJh$@Z~UJ2 m<*3)vN3GtyTTBf3*XGZ?o*X|(t3&}*Vtcy!xvX5F&z!2c#C9H8M&g2cN^#O(hd{<6fR8(zJ`||I;Xi@q7 z|99=XjEk%uTkJ}WJQp5U%kHS)Imsh(+Oy~xSNnIZi$82o5xeKw&iA`tFn_OoziL(0 zi@OV3;&N_3yPADpRM>T*iEnbx`)&W#U8bcb)u#PB$NGBLsf)}3{l$FI47C**>;Vi` z4ICTTH*hXG$1r`qVv1k~!>8B90*@4qICeA(1UG0htYZ*lFlPvE;1FOeVC`Vo!8n7- zrGcYC+kxc(?*S17CKrYnMkR(khGh(b3QP~UfU1}cfa(Mp!hx!!8#EnQ9tavd+wRJ> zveoyp$fg2atMkPhcX`OPDbC?2l<^J}d6v->d)>Bly4cfLbJ3)FLUmI1?+!PC{xWt~$(69D2xlJx)p literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/GrayNode@Pro.png b/Editor/Nodes/Fundamentals/Resources/GrayNode@Pro.png index 9d2c947eda53f4b137c2d2fcedb41f06897726fc..03f67dba6674df60f19c625f80165ee2c558022e 100644 GIT binary patch delta 314 zcmV-A0mc504Cw-pIDY{fNklz_+OBzv^_K~#(_$fuv zx#EQ&*g)nyc;uXt=oRaI5% zVw}`zT{Js9$}>N~sg&Q1)W?OdL+>X6xim(*)p@4f<#yQW=2xlt4QUS{#nG9lEC2ui M07*qoM6N<$f>^kPEdT%j literal 1551 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|Rq- zW=KRygs+cPa(=E}VoH8es$NBI0Z=sqgN=PfL1J=tYKcNpYIG?W zUP)qwZeFo6&;%|8uo*6?#mPmP1tppJc?uvi6O-~wOKjEExfGyAJC>9bWhTK*&nwnT z1dEh{wCDjnt)G}utZ%4i0CJXsf(=Bym19aVhzqeKIJFSWf$(xN!8R2n78R$4R2HP# zst2VO=a&{Gr-DrYX@VN!T$GwvlA2;?WME{fYiOuzU}2+=CIzwsp~1DH#52V%(ZV>{ zz{J8_H_ar~MAszM%v9GhHO)ZR&?Lz?)ilXCE!iXyZV*HZsxfX!KvPVOOpVM;Ee%Z! z%`HtW4B#5TlBnuK@=KF5Kwhykf-6Iafz{gRgF-ha6A~z34m4EYIv_y?QHT^R#79+1 zGCZ0JN{e#9NgyRzKQ$*cH#M&W6iJ5ANJ>ezD#T zt9RpLU|@>#ba4!+nDch_-Yn@rf!6gp;wQBwbi_nl)m)z>wZcHQ$aO;Li|#L4zo>kXZ^e}AuX)?0Klx8m*&4Q5 z^pZ*IPyZhqXPJqf_g1t|I1yi}c`LH%LXO$t0*jWP-03As$BWq)uMthCJpaIR{lV+| z91n<}sSjDa{g=Z_AA1I+V$lSFe;rB=2Shv)Z@myXy_~CPYQy8`-sdyEN&FR-EnFO| z`Pna$@yON;X@-5fFRowpQepq589k8CR9BB$FbDtqUz$3qDuc*R)_Rnx5au>=YRKYKbSD#`vt8Q3I2@imxn@+ zo^t;>QS^hpRjqJ+{)6DN`5jIji!{De+4{8ZG81|HY}yNf+R`GsV^x|PO*Yl2Dt-UH mD7NI(>itq~a?cD||1o)bHGc~DlxhnqvOQh>T-G@yGywoLwJ%%% diff --git a/Editor/Nodes/Fundamentals/Resources/GrayNode@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/GrayNode@Pro.png.meta index 59c29a21..15ca8d8d 100644 --- a/Editor/Nodes/Fundamentals/Resources/GrayNode@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/GrayNode@Pro.png.meta @@ -24,7 +24,7 @@ TextureImporter: heightScale: 0.25 normalMapFilter: 0 flipGreenChannel: 0 - isReadable: 0 + isReadable: 1 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 @@ -74,7 +74,7 @@ TextureImporter: buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 - textureFormat: -1 + textureFormat: 4 textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 diff --git a/Editor/Nodes/Fundamentals/Resources/GrayNode@Pro.png~ b/Editor/Nodes/Fundamentals/Resources/GrayNode@Pro.png~ new file mode 100644 index 0000000000000000000000000000000000000000..d8638c3186f86e02c485452899d315d7decddcd5 GIT binary patch literal 701 zcmV;u0z&lcW>g#3vi(eUARC)BrM!Gvlu1Dh#10OOMN~@Cd9-GpyxDcp#50%ea`!yk42A_ z+c;XSmb+Xoqhhi6IG@k&Y_4tj_jIvX{6yE$U@(Y1&&&0Cy`|A)t%Wt4%`2|!9wYo( z9LJ$;+XwtGOw)ABwVyx!cs%Z+?F10r>2&%KeX)VC0?=-^YlwbI^#cUoDVNKc5&m!W zCX>nABuRSn`TU5r#HrWozGYdDpmTsl?iUJ$awbat9}(!gL9r7Y5CYro0L0!B4FCtEq5+u3FB*X9eF{M84zSj(4p0XOC!i4! zZUEf|H3Av|;RG}S!VRFifJQ(gAe?|kK)3;P7tjc31cVdN2naWT?gAPCjeu|h8Uf)3 z&|N?ypb-#GKqDaB0J;lk1T+GI379v=MMpsVtFkyi_S@n(U~VEHYgA;T=P@hw!)Ao+ zH?wq~CH6u9oY>glljAsFr2!a?Mjf^9{N_ z()V8V`~Bo%R<_Y-I7Hztiw|(aRot-4Y32!c%yg9*Fxr;kO7joTJnQ)*TQi#7H==%u jwqKkt5&r@4tMU0i(z4|5jCVd&00000NkvXXu0mjf%c(!= literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/GreenNode.png b/Editor/Nodes/Fundamentals/Resources/GreenNode.png index 49c9603546e16b20402b8c5bb1c1f22c6c063238..2e82229f2e51763d081d75b7e22aa1550f6619c4 100644 GIT binary patch literal 395 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|TS2 zr;B4qMcmujhFMOIBCgM~!xEE|o7QeU?I9X;R7EOg!h*I8(Mvl-HeL%cTjzA}_mRf_ z2W-#gH6}i*uP=VT`*`?Xt*h5kKHFS>?EW`4@%!R0I>+~3O}`d;)b-GBtGX@oxrA%{ z&+V_Pm?-$V{k1sv-2TFRc{bPT4f(Ef^`rhjS`+ejrJghU$DNzPg&%#~{ZQ@SvJ3f% z4WF}iNl!31VEKRHT$Tw8#q16TY#9DhO9q{>*C*;ldb_wKTjcN3SL d>fiLtID*Tt>yqa2y};0A@O1TaS?83{1ONo%pf>;j literal 1985 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|Rq- zW=KRygs+cPa(=E}VoH8es$NBI0Z=sqgN=PfL1J=tYKcNpYIG?W zUP)qwZeFo6&;%|8uo*6?#mPmP1tppJc?uvi6O-~wOKjEExfGyAJC>9bWhTK*&nwnT z1dEh{wCDjnt)G}utZ%4i0CJXsf(=Bym19aVhzqeKIJFSWf$(xN!8R2n78R$4R2HP# zst2VO=a&{Gr-DrYX@VN!T$GwvlA2;?WME{fYiOuzU}>X|CIzwsp~1DH#52V%$=Jxk zG}RzgH_^<%MAyV9Em=1y(Kt=l*u=oX(8S0z(bCWqZV*HZsxfX!KvPVOOpVM;Ee%Z! z%`HtW4B#5TlBnuK@=KF5Kwhykf-6Iafz{gRgF-ha6A~z34m4EYIv_y?QHT^R#79+1 zGCZ0JN{e#9NgyRzKQ$*cH#M&W6iJ5ANJ>ezD#i|)w+Oi$*WxBVU`_PKRRCD*ea#run_xEJ=Gf7t%%=U&gv`I>oO{|Im7 z-@M`T*Rn$XtJh||0off)U8Yow=ABYeyyya zKmAtlvy;)6zXjSolz9+*PO&fE{jDBT-%c{bjVYfsqci+>N;nf=eT?g-Z@*?l{vtvWx0 zSzmxD@zSxI@0JKQ%(!@$E%=g3zU;9i_ zsq@_(GrNTE(~Q!d=RFV9C6hT6lIPrSUTl{uf3qec>d3R1D(gG6iae)9E$K>9P7RxM z?Wbt%k}eL-)$y{cYuJ*${}wASS(o`ZbnA-Gi*D~x`SN6Xy~DIr|7)ke?%pdR>34Wj z(frP{W#%^P`|DUZSAUo6v+vudbZlSc^ZRAY|4myoE-pT`>1hIQ^*M?AaSVzFKWsbV z&3wLQwdsE=r-`dwd(UQ1ek39Dfb+8p$A`T~W^ZJ?FzM`mCkKYPXV?3OshfR!Y`njk zAaO8@fCvoe6q&^6ZAY2RHxv!09pb@BM|x<`izzQe!yZ)qR2Ifoad& zh59-?%@2Rv4=n!b`P{pQWaQ8~^%rqV}kLwZfK zbF3M5ZJD*&UH3otoNp~xqgRT|+u}WmrQqbv$K4U`4lx{zJ|VkKdi|C-Keavk`qqH2 z>K{`c?0&hm==xgUkk7v&Omq42k{(yQdmMKDm9OomxN|!i76!`y*?ZvO?^FA>&A7{2 znfoQUP;=Um)d9!j4|E>*erdDnJS&^`GX#4g|JfgTDsJ;R+B)WG?W zUP)qwZeFo6&;%|8uo*6?#mPmP1tppJc?uvi6O-~wOKjEExfGyAJC>9bWhTK*&nwnT z1dEh{wCDjnt)G}utZ%4i0CJXsf(=Bym19aVhzqeKIJFSWf$(xN!8R2n78R$4R2HP# zst2VO=a&{Gr-DrYX@VN!T$GwvlA2;?WME{fYiOuzU}>X|CIzwsp~1DH#52V%$=Jxk zG}RzgH_^<%MAyV9Em=1y(Kt=l*u=oX(8S0z(bCWqZV*HZsxfX!KvPVOOpVM;Ee%Z! z%`HtW4B#5TlBnuK@=KF5Kwhykf-6Iafz{gRgF-ha6A~z34m4EYIv_y?QHT^R#79+1 zGCZ0JN{e#9NgyRzKQ$*cH#M&W6iJ5ANJ>ezD#i|)w+Oi$*WxBVU`_PKRRCD*ea#run_xEJ=Gf7t%%=U&gv`I>oO{|Im7 z-@M`T*Rn$XtJh||0off)U8Yow=ABYeyyya zKmAtlvy;)6zXjSolz9+*PO&fE{jDBT-%c{bjVYfsqci+>N;nf=eT?g-Z@*?l{vtvWx0 zSzmxD@zSxI@0JKQ%(!@$E%=g3zU;9i_ zsq@_(GrNTE(~Q!d=RFV9C6hT6lIPrSUTl{uf3qec>d3R1D(gG6iae)9E$K>9P7RxM z?Wbt%k}eL-)$y{cYuJ*${}wASS(o`ZbnA-Gi*D~x`SN6Xy~DIr|7)ke?%pdR>34Wj z(frP{W#%^P`|DUZSAUo6v+vudbZlSc^ZRAY|4myoE-pT`>1hIQ^*M?AaSVzFKWsbV z&3wLQwdsE=r-`dwd(UQ1ek39Dfb+8p$A`T~W^ZJ?FzM`mCkKYPXV?3OshfR!Y`njk zAaO8@fCvoe6q&^6ZAY2RHxv!09pb@BM|x<`izzQe!yZ)qR2Ifoad& zh59-?%@2Rv4=n!b`P{pQWaQ8~^%rqV}kLwZfK zbF3M5ZJD*&UH3otoNp~xqgRT|+u}WmrQqbv$K4U`4lx{zJ|VkKdi|C-Keavk`qqH2 z>K{`c?0&hm==xgUkk7v&Omq42k{(yQdmMKDm9OomxN|!i76!`y*?ZvO?^FA>&A7{2 znfoQUP;=Um)d9!j4|E>*erdDnJS&^`GX#4g|JfgTDsJ;R+B)W6Otrq(ixFrsM)e&Md+47&7|B-&1)1H-wU(b zHA&B?W^0@I|L@to@8#mZt_q3X{P?m{|Kne~5523uw0Y*YZ~BqpqT-zIUq@uxi>UpW zH%I=j!34qfYhSy!p3A$l{r!H|YJ(pc?fWk5>fRjm)xNZ{RA9b#wW*@qbYAn1=B;&n z%yYso-)(4NJol6Ttx5yS3~L6aXN(X01y~#o++h?j;Aer#< z9{pXB8T;hs!~B(HQgeHi=9^gmnUUV!UiES5T|-YNks2Yr7@-N%pLIOn)xX929ba+i dKizCQ=I-qVpG4$Lz5>IS!PC{xWt~$(699_NmKy*7 literal 2046 zcma)7e^?WB7(Y}5)&piiBS4v$PQ&fC$;LKdFr6sM#0DdvRBm@CEVkR+-C~T%Ff$C) z6hpBLQwxPh5d1+u2t))aK}3-xNI=B^g8(h%cijdLX7xwU^ZnlU-uL@?KkvQ2p8Iga z`qhpUHwpj%jv;F#GV%`j4Qefk1_1v+gBF4lP=cmFm4@dTk2 zf?#4|A~SJ0Q=^Lm*#dz8WN|Mr_iRT#RQ>KDyG>noC#SqdW#8@3>t(G9AqcPGgxIH zLJ*NJm(NlNV3gs@gJFgb!cj2z{4Kr=9>V4+d=Qk+M|`G$X6(ZlhUP(++**fX6K>knG8t5QxT#VSl?W!hpgWs|_amF54J3W2A~ zq}A(G))qiu5LKaS6eBD}VowzbfrW&UP@&ICBvuj6mx$~=p$fv{0_X+?f^LEIDuOPO zV^%YShM>4I4x=$>?EeUCipwATo16a#Yf?ovG1<=Gbkmc<^w^*nIV(DHC|)1Vy8!^R zBq0)UgyBeEYiro2sE6G^yRhu#vgJ22iXG$IpQw*{RQ^CTyt0I$-rN$L=AQdoRiwRF znoQpyyPCHH$w-G5yyb5LS9SB8n+uoe4e)%}PaSp1k@Ah<3+nDV#HZYTXkXt#Z5ui5WLLhwB(2|=?GbvZ=$PLh z%g%OIHppv&yJ{{#VfY|^MjCl()IFu?Kp2vGfld8<__)03Mem)uGmB3oToHMW%PNaK zx4CY9j6F3kf_~5S)8p$hsl_>a#yc^n(~9051NKek3x@nbILYJ-U!|C{o@9AiBpBn z$=+aUKH@swmUijY(UH0zLsC0jM!6}$Zpq%6(W5@``{-c0uv1Yg8Zs|6F-_uOY{~1_ z(PA{@oA%BVn*PJukR6dUR;~ zf_h%)bv{-3Vl=U|iPKj2(k7U%}&r4J5#o%HH5zwlTt zNIi$QCk^)MyT;d^8Co_ZT(>+K<7derSW_KYFSfDWv-i-+kMHbzG>o&egt3R4cI~%) znrrHZentL}n4~kha|(7;y#M7=W9>EXbG@C}i=sCuHnhmc){Wh4cF2v2ip>3BaQXGx z*ph|St=rc9CQW(r0RA(h*q?siHg0~!#@-hEZr9}o<2T=yJ;kYycv+{dv1z0YH+6nSP$K63ZVtWYu~};fmPz{sN=qJPH5+ diff --git a/Editor/Nodes/Fundamentals/Resources/GreenNode@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/GreenNode@Pro.png.meta index 5977ca53..354119fc 100644 --- a/Editor/Nodes/Fundamentals/Resources/GreenNode@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/GreenNode@Pro.png.meta @@ -24,7 +24,7 @@ TextureImporter: heightScale: 0.25 normalMapFilter: 0 flipGreenChannel: 0 - isReadable: 0 + isReadable: 1 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 @@ -46,12 +46,12 @@ TextureImporter: nPOTScale: 0 lightmap: 0 compressionQuality: 50 - spriteMode: 2 - spriteExtrude: 1 - spriteMeshType: 1 + spriteMode: 1 + spriteExtrude: 32 + spriteMeshType: 0 alignment: 0 spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 + spritePixelsToUnits: 109.08 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 @@ -72,7 +72,7 @@ TextureImporter: platformSettings: - serializedVersion: 4 buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 + maxTextureSize: 64 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 0 @@ -138,7 +138,7 @@ TextureImporter: customData: physicsShape: [] bones: [] - spriteID: + spriteID: 5e97eb03825dee720800000000000000 internalID: 0 vertices: [] indices: diff --git a/Editor/Nodes/Fundamentals/Resources/GreenNode@Pro.png~ b/Editor/Nodes/Fundamentals/Resources/GreenNode@Pro.png~ new file mode 100644 index 0000000000000000000000000000000000000000..a84ce940538176f8a0a7a9ff8ceeb70820a5cea8 GIT binary patch literal 645 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|S$} zr;B4qMcmtHYrn$|0=>#oQeJujd|>{|Vm z>p}U!_03l03P);V@@FtecGL*Vo6jizDAgeP;HjQq%V)Fw8*VUekM?x1Z54Q)d4gNN zy>asmu9iJL0Sr6pd-_Ago?qT(?UK>B+2(mx+?Or?rygD#wKShq^IoC#7FEXDvQPgd zZi_OCY3JuVGFfhS4rYnasF=qzO>p7FI_?00E0YWuw{&fMsLPnsm-RD(X<*nMO!po+ z_bp?3YwF#5zMw{&amji;$umk%3aUjI{WecC?0WD(<{exzVr4e zI%#XOWWImE^5pQd3m;4+wx0X;;p=2gPQK^+4{ns-&aKWV@F-*9`$d;7T=n+zC;8`+pLMEk d{9pKsS%bMs*K?!B9bmd*@O1TaS?83{1OOA~7&`y} literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/OrangeNode.png b/Editor/Nodes/Fundamentals/Resources/OrangeNode.png index 4144ebc1ea36add6417035a6ae2bf9b420e3ea26..433d1f56ca473802995b4d79911f47bf8c927264 100644 GIT binary patch literal 446 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|R4$ zr;B4qMcmuj2XhZOh`3yz5XA6w0^bV;EeA`sNhK4cG!)I4`~sysc0D-8n!)Pw%suX; zlT-10S?|?%w>~#A_W$%UeC6ku=_?PG-m6tFvpal#+b@sqH>K=lxP%wn)h|zHs&E@7~Ju~$b`}o5-&-Z=jeZSxPd(V5z^7mbCWH`$Z z001LT57z+lbW|_>iR4}^iftti1KcA-4ggc?)JrRW(G+t4&<+yuf{9=sZ?-@hLq~;D zK1Nr>;3OIVILj0`Dp-#ZR6Z6dl5oN9>Kc$L5^}*HmJh=Rcfq1W9!WARFv*uENLnwj z6N1Ye3^@umNf3h(C{+<7mdM!(E~w#UlizAJ43Z$3FoGT6>OKk~B`z365I7r#6A}{W z35)4cStN|u+1bGiCd_0)Bm$BrN(fW|N#xcfgCSMJ;fl!xG7(OQq!Ox{6Xi?e2rdX3 zQb(zs2tp>}kFiVSbX22>Q=8DqpkY)fhY>nM{aaKjX9Ul763W%$h?77pRwIl^Vv)uZ zj>_a1FA>MMU;rkU#>oVjhCyvKO5!5JPy!P=Fd0l1gdh;ZjsySiO6_CZz)eAT3LS(P zi-oX|r4SOqLLnP0LI9zBj0M@)V783KOg;m(8z&ku`I5$+PqMI>EanoH9b$vn+Od{0 z#yo2-zr^#Tae^pyC=Sdq*tkxE<-qFfibW$y(Fmhi8M7Ek*$D8nvV41~go3d$;c+st zrUiro7!zYLn1oOl2^lStP{1Zcgcutyk&~GCvP5L>vBjt)k_##zAr^tgi3!kw$ydKr zh>CnAo>2-8{2BXKq8U+zN3sz|Xsk|z;1>Jh}@tmoYyMB(g;XIG;9_Qw6 znX7b7pJtj274cS`a;8k5R<>g&dk1Ah!8AGNowsXrmHYal2cFAzt@YpEkX>g~S&84+)HJBI;comkp9{%1=DTHD_j^?g zZoBmQVQC-RL0-D#r{-o_nj_=ZJtwxM}}H7mB@Jl2OQ!7_lT>f2+T=8yN_#&srnxXvw~7j0WQTeWWj#nb z(Y3;Fc#6)-zbrzB%R}$`nrB)?0q+Vb!rPx&Jfsit!J#&t31$S)ycDQwvG)LGwHnqY zqO~7NFKCH_01(ho0>;1uM?fFYq5?YKA}mNM`V!ZkGNCpM(CZ8B(AHW8A`ZIt;!wu)(A(A7t<{;K zzaz9yv#WACS4talDfcYPtoFV&u>95R?zYz!r5XFpD_>h)i*8>tH36}NpCwqvy_k8M zs>}}#Nomzl?(WFw+?&)C50y^JyZ%6c7&nEd*G)`F+pwUp5J`EH81~2P`kUED3fy`` z;fFr{>vfqKe|d_sfAenJWL3`bjd{qtHTY_}`{usc9SbLwPd?kw&3|+!E492Rztgbc zm66M#;WB&PIWq&tB3tU!hrM0KY2wCt1HG$N-j7r{+2L1TQW}Xj@A33VpEl=!K=wem zauC-&9bJ6k_#$9eOk~#A_W$%UeC6ku=_?PG-m6tFvpal#+b@sqH>K=lxP%wn)h|zHs&E@-^XkFH(f`YrS*vlU~fS)g25;Stg}zoTYcSowJIYZDUeQ!zzE4J7$LF_?|yhXk}0L=oz~RZ$^~ z3Mzuwx)gO#P!LfuI--JAQHv$E0TBUl0s0ddl#ZS0{CWSqd*8X|{d>=S^K%wOhdMh< zcK`sunG+TigUoF6u(w0r#ggP_$TUV7woDBGF4g8SYOj~e3;?iRD&fY#aZ!v(QhtYL8Bxf6TOrYg^yA$fL2Mu(p1orv}mp{ zZMBdFqWxJ83>_UIkU=mXrIShJYPybzw(!!Cwb_kBBOnzhqQ?Y<3_%c!iCzW6N;(dw z)oQU?5>}xS;|Mew4TmS2b6^)2vQ4G5+y8A$WdlazCfXY znP{{FYKS@jhE)>5FuPoh77Zp2ooaYs-Abmw;d$ z%mG;h9}!tZg?unH3ZIH0)9_SeMHFH1cu*)55-6Y$5)Bg#hK!^M5g;rSB85n$&K~n8sRE)DlFnK?2FHWW#G)!l}ZMSVljrQG8{2jvO(ZiviyIkK;f`V zN{vctX#r4(gQSoQlEY?^2ty))LOLvgrO+3N0;KRriICo-OZjp!6RpF5kch95!e|yz zV17^-6yY2B3{fy}U$K89n?V=SyGR$~hI<_`hHncbN3MtpxeNJyy*dD}VQ_*1xVl4a z2P33hXj1J!a|P-46I;(1$HJ*erC|~0qVS%c)yEwd9KRP|YExq4b}sg>t_=6mNUy+i z@-5%P0fA1{qp$Dvh}k+L$9;?kYr-UN&)D(SbA#C*_t$C}V$mw^F@DY$+Hza`Nt-YD zG=Io@wDR^W{}NKKpfowZB!yjOr7t5yjQ#Cpo4>xQ37q0xfyZ|4REeM2tSPo8H)g$A zCk=`C!}(5OGuf)aag+Ugy-T8^+Sf11*^1qe1#O?nY6(4~X{d$uezyceOQ$ z71MLuXWxdlUpvRuys;O#P!AF~rq|JTFWbku$qBxbNmwKF{Mh`I@QzyH)Y7s8qRqJX z#$qpq-@5bSvb?sPdQH8zfk(T4#xRf_}SW^zq5*%+;qsvWuYbO{o*7 z<9w35k+;;XXruabS@^^58vb(L9@~IfCCc4hbBwK%yY5r5{Rzw8{@it=C*Efn`Pz{r z7aq1`erLbN-Eiz?UV`AohWHa%zuyW>*)oy!aAVh}?r7S!v%;{O1GBMxG1yNl{xqyy z`-^q2B7jTWaMF?asVNCPkAR+20wFq!vkD3qI766k*7?r{P$NzJ41Tx*KR}Vx!9dJ+_3Isf{y^6O{r(d4BD6vYf zvwy+30$BS#r~`WIi!So_VeBF2kiEMnu(2M=*Y-@(r7W#Dcy#974AI0|MO!1TJ*TIz zYD@Xa>O?Z_bKt~GL+zY)f?vm3j{4R8b~~}FOYl7pkGisaiYg%pD zF5mLfGrSwGTxZjpG8WhMKib;3tKAOYXlGjErn#1S%M^O@P>ZaPzdYX9bRjabNW^P# zhYa4<3)Av9U0SJ)z+ZbOk1XzcPo0~dc)Fz0))?hmS6(=I=99bmy}>nKO0Glw^bY`K}K~{(j3b_uVn2Lh$5%UZtPr z&YV-(PghLOHQ5Rdw|8GiQ*GN-=i-haj|u71xF&5T?2YQt2kYN|fFa$0sE71ckA Xv(p6hP1pvSf5@ER=%7=9iR=FX(+wdR diff --git a/Editor/Nodes/Fundamentals/Resources/OrangeNode@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/OrangeNode@Pro.png.meta index e7db6303..840b6a28 100644 --- a/Editor/Nodes/Fundamentals/Resources/OrangeNode@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/OrangeNode@Pro.png.meta @@ -24,7 +24,7 @@ TextureImporter: heightScale: 0.25 normalMapFilter: 0 flipGreenChannel: 0 - isReadable: 0 + isReadable: 1 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 diff --git a/Editor/Nodes/Fundamentals/Resources/OrangeNode@Pro.png~ b/Editor/Nodes/Fundamentals/Resources/OrangeNode@Pro.png~ new file mode 100644 index 0000000000000000000000000000000000000000..0a0167d3ecd79067af52f0a8dcf382c5b89f3d45 GIT binary patch literal 444 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|R58 zr;B4qMcmujyK|WwC0f2W=*>xT;dhymDER43gOo;Ndycx>yF;P@3~I}`1`)G?W zUP)qwZeFo6&;%|8uo*6?#mPmP1tppJc?uvi6O-~wOKjEExfGyAJC>9bWhTK*&nwnT z1dEh{wCDjnt)G}utZ%4i0CJXsf(=Bym19aVhzqeKIJFSWf$(xN!8R2n78R$4R2HP# zst2VO=a&{Gr-DrYX@VN!T$GwvlA2;?WME{fYiOuzU}>X|CIzwsp~1DH#52Xtz&thC z)F9bdH_gy2N!KLB%v?7yEh$mg(A?BC+1T7H&BELqZV*HZsxfX!KvPVOOpVM;Ee%Z! z%`HtW4B#5TlBnuK@=KF5Kwhykf-6Iafz{gRgF-ha6A~z34m4EYIv_y?QHT^R#79+1 zGCZ0JN{e#9NgyRzKQ$*cH#M&W6iJ5ANJ>ezD#@ zzs9|Zfq})`)5S5QV$R#!-Z@i3Mc6+~UU}q*OYDwd?N8`_FfeUpL?2^Ha2%vM=ZGmVna{+{_m}8aje2Io?I=x@^n+_*lza&YH{jUfae; zTR*zC;{F#MKcjBX;`8t4Rp*O;Zdd!q$r3p~Uqz%&x)7M`IHlSVsh2&If1R;EMs%dzmhHbbG_CkYVTn? z#?&G+{wmW08w+&ra2|3lP5NP0x6)@`+yt9BGt*LEWq(_>>j+nvSM`cJrtvA#p7tL(J9=9(0+U8fwzHae~uDg5G{)C8ROID?me8Sz?O*UK?j{WL7{d9}jR)gbR8!Ag% z_paENs{g{|_5|V9zh{i?oifyB1gFfu+WY8->Hb>g1#vv*A4vf{B#s+$EO9s8S{^)*D-iq<8b)KV#BduI%A0*^O^Nb8B7WcM5BiP2c0+@ z7&ws8gLuY>&-+E=gc&}c`ETA(WSPs55)>-Y(0xtIK~HJP<~qIm=WomSoD4a6l5xc( z&en@YKH-T=RKyuK2`T4E^mKQ8-e$Y}dq)M&t0yP?XUvm$x?9XJ_9x!JZ1mc7IS+x!_^Nvr7R1@moJzuf1)P;Y4#azC8j=}dD8mVKc(%8JYoFCH&$2p zyVu(#_q6+tct7Qtp=`iXebn9e_ES%DBk5c;6izYkm57r%z0@|Oex3Aro3?|; zZd!LgyR^Iia-6nX{{5T$uP@F0$)JBSzlO1rYu3->jy@rJs@lRC&Vpt13ms z0=d+g?t8z#X4(6EZ^XG->iQo~=gCdKu(Y9=o2P4ia%g;(UkrFgJ{Hwz1cWh_3TG~dxdL8?l@7o^X^Pf|`m&Whh^-1A_ zcdgAUxx)?r5C6QvZ?5%duh@r$;)^HU+qZX-wZ;Bj>uRD!4PI@j{}+=l_lqI^GB@W!Xe)%ZFeL-tM<{Q7Oc1b+2PEt=|sE+p+ zXRdL78+Q#yHkliS3*syo~@@~d`%4JGy8@_)nF+5Oy#P0~h zw|(>U*nadO46Py7RKtY#$#+~dAFO;}+RnLi%l;JJ*PG6}r<+?@RR?mwqj z`2$5^Rm+&J9cOyAG{g#)zol(9XU(ye>kL5P>FVdQ&MBb@0P^y- AdH?_b literal 1828 zcma)5Yfuwc6yAW?KqV@|fG>!H5J2)IJQ6~H5RiyKBtbxFWs|HB$jf9?0wPTj9HFSS zA`qxEfKsLq1HM~qi>L^lB4SY-Em{i|jDk#yC_0GUBup$Ff4DpM-aY4j=R12|rQC## zjt;9F00400#Ilo+Gs3jci;=xqyz2pS*ehbwQ~-dvYFenH8!)Q@z&1t9PlZ$CH`9f3 zDFGD81rR|aRUl{pV1#QFpfCr5u>vSlEDOU;UhKeO#iB4=N?<%GUJ(UliDUDX5HCN0 zFU-#o(nPp$rUOGmM+l@43}Q7>iA+V;gyGD*bmZHlCgKo~QnZtv#EzMVAW|4E3x*YR zA~82NmyjDkkSjBZWEzb|BvFVI3LZh=Re3TP)Zk?*PlUk%Yvy1>Dxp%WfW>kd*2D=4 z`4JCRS-W<0fpg`AeCIL6hdYOlhHg$loA4ANW`R&D1mq~8Bd}yi2u7X`FLj# zt${fvI9W&$1kmsTK`<3hg^=(;5h%cmf(0Tfl@t^bA_}q+Sxgqv#0U_UKuRDbD3C^` zl7nf1AtbAT`EntiFINk*OrbC-R@gh88OtD=vMUi=l42I-vtqTdq|5^RPgy>^R3f3Z zObWG9Vr~JEkO)a2DI|kUMIz4^NhGAhVpsybD^a8bURWZe_vjK(mKlcA;6>0*P%VLR zOp3ttV)0n=d*Yd=U=aVq{+?(oDx`OjE+$%g9TBY40?CjOQ6jTY(7JX688H=y9m&^x zGf^9txMGWQ_l=>@0Uf44=q$G#YTB@(D&|fh@JY2>_}+q_MPg z`R>Dq8eC_5i2EAU!S}wtAa(mA?%TXUPc$pG2#`xx%bJqBlWH1kZM3foD8`QQ2}k#r z({@MRyy@igOio@7q$m8uXgP2TNmXH$vu)n%ul6ljT-d?oE_Eo$ zD9F&B7}k@^L1&@w=+u+ir>~vI2&`1j`h*H6`}nL%f0HdHAT{R`|i8k9cL$m zZC-30z%>pycH9gd2j(dI(U;4lPq(I?)3<1;HZ_%0>b2idYhE|HqVaP-w8ULN z$)=;0O&sOL1IJbt_}FNr?gdYt4FaTB8_^M|sE<(Gb-?YLz&4jUH^4RnSfWLdfW?=9 z4-_za>K9r(3`d3h^VWsw1eBe0m|3Ci@QA>%vRbq~L~W^u%`CcS+YA3Hp72<9b(X60 ztCf;SlHEj>p=EzfgGW0-5X|^11V=_&v`ymdk>)TMU6VXpWUQW>G(mgB5JHUaqx71DEoHZuz{qz z_wg%6t=El*n67O>*K1LCN89Xrn7jLyPBg|H962nk7)32#E#`E^=3hTM*8^}tR zKfayS`{0T3l=pAq{+Qu*5Wp12rP})`w+cR=*^z$dINsCHAWpPxm84Dggr^6T8xNho ze@2qlmYrsk;D~WrRJwg#Z)hJ!zn|lOAm({Q6Z%Md@s&x6`;`XimG%moF^@~sK2*D# z+rIS6#K)Sh^M_h%N2jGjIAb>}y@a#2d3bBeY5i1yuKd6mf6$`&?J(ji{3~B=%8BM_SM+} zLU+5JNq^JxmH=sRgT5Ra9!_ilpsbWYi(qX@%2`+u;%3bGdQX!02hdly(?J-hR%6O> z3*cIR6h$0OlVm9!ttd4`R?#nEn7l%3*-ixFOtsqfjR{cuPbW*I(|ZA1AQ_1jdWR8+ zi=o!HB=$pcR@QRg&dJ+;e z4L*k95d`8M_DGc@r}#fP+EM18(LsKN#@!0~rPt9k9tpwtLb=S&MiIHh#n&KEd*YaV zm-1k!)CF86q)c83kU8J6*%@5#-j_FlK%x`5D literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/RedNode@Pro.png b/Editor/Nodes/Fundamentals/Resources/RedNode@Pro.png index 1ce0a8779ad7226600659be74064297828255d5f..1db0f9a807078137b482efe85bdd99e7cf1887e9 100644 GIT binary patch delta 384 zcmbQvzn*!5MLlDpr;B4qMcmujj$TfI46c7gcTC)3HbG$Rk-}NoUarzx`_ddQFl{jt z(kPAp`atl=-1+tPHGk^fKebNo!XGoj*R8YR_~Rxo zeK%R+L%l`*uf$bKaoLR3dnKlRc~jN&F5&N=pr7|b53IQS>w8sk{dM*qUiYSK&||In z#`({m^SJPq_j2#Hyl3SJYS`W~w}bIbt!*sN2ic9nh7EhyFYjjDr(CAQw&DBN62k-K zNBoX3eA_oqkL^d_jZTRJ_pV<)%5Y!MT9En1@2XuA53G~alNhSw{l%GU+~2tHB)ot9 zGO6Kx2a2JU#F#3|+-G;pcM8)s*7cS?Czk$I&5j7KwX@oN`QpvfQ3s};s=QL$H~&BT zhB;H?Rx~Vs&-7|(@)mE~`>)jgTkEjyTX80S{Wr^;@V?v13_#%N>gTe~DWM4fEPcLd literal 1943 zcma)72~ZPf6kbpSqlk<_5Ud6PqtZ>X%V843jR`|nCvbPS(1=!Bp|k+AaYa? z4+LwyupUFjO0A$$5EVRvh_(oFD2H;WD8yF0NH>8&ZJlXnXZPRt{_lPNzW2R1o3=b~ zktxNR0sw$%fWL1Lxq9kulX2wpq&TLPT*k}%zfu6eq$|4HV7KEW8vqy+Di*9HR`Qo} z5ot6-h)P8mLlrF}(Ez~nP|1Wy6h_cQScF*OMt^>xoK6#?ZuC$WK8r8&!6L=}@p3FU zK2U(fMSMj)i+Mvo*2 z8JEe7jg4i*Ix(d32qwhgaF{HZ3Bw?X02Of(LZ|{I3Oka4Leq2jVhThqmJwp9gr?&Z zilj=yjZUY~MyS0ALM|4KvP%>Uq28m^g)qpZnL<>-gcvN{XVGZ9VLaChRp`v&LxQmw zy)kUzV*N=npPbZ2}B zSg0ZbP3Oc)@LXd;8ok168Aqt1X7#l*NQKI3HPig!_B#R5|0=v3! zAZKVk$A!%r4bX3XiWf+gNTeBM?_A}!WN{{l^n6h0lr=W z)%VZ#@goJH)M_)QBS+d=HukZLWr$6A&TJ&ae{4nr-~6ff+6D&Yl4KrHm$E8Xyk=M8 zU`oc+^7AJ4NuI%rMJ~|#{l5m{hj&!12lJoWucbcyF=cO7>{|~f>GDI2yDxI43@RSj zKR4}qcZ>5XynpET%S)ft&(6;Y$iMdJc+LHDZ}S$E$MzjC@2U)Q%1ckk6r{&d`z`lt z#;DC0@JxL1vC^hh@w;w1yc>G|OWKRO;-&2?LoA@WoacL+Qu`~AgzM7mHQMQl7NcaS za{!pfT1HqEYpU@*eu~n9+O9PBug?qE1>*|A)@pt^d%mLbeot9dved|{A@QtvWiL_? z)VzAKcERAgG^n^tU0ZPa9B|ap#J$^x-n=gGPD8o{F>QBl=Y(7QzRE2{#z|orsZlZS z$DQgZwC-GC`bWo`Ih401ajj#MHT9CdioxK0P?NO7^0xYxe4x#*(8iOIl{#>yYGqDp zXRxtBvPTWiVe;~qLvu3?g_omtP7|Nqu--z_kZj}7|K>*Sm1*A83j!^_)1l?G>60(0 z)AKnNW0gcr>9IRQ7y46`CBn-I#%`&s?A0YRINx05f%|3!mir{vo27adn15TLPS(um zo^I%AIe0I-BcgjlB{|=D7ymVtCL55P?%-Lu$O0nZ7Bzo3BjVkRI1-3%q2VyA5bI#Vkue)wmMf zd$NeA^zPo4tJu+8nW1(%(*35m-nGu*@v^J-jYjjH+zg-FvpFZ`B>F?TU1oZZ;|<%H zd6%v*ip^4n%5d{{nik^zouo%Mi#^z{UdA+XT+6KI-`lgumYP*lWwoT8Y2h^B-B;1I z?-sw+=TzA0rt~^yb?40dZSwD9k-x+5aW*>NgURFQjg=6TQ z>oi)X=i%yAhrtun*WO8fa9-y$q`L^;!>|h0nrhk%HRi7)gzT+3B~q_V>|X9qo4&0* rgZ0d+YT3B#*>PT=Veg_Y?SwzC`fTjzYfB{moIt?BK;Ki|>o)%lcF+AB diff --git a/Editor/Nodes/Fundamentals/Resources/RedNode@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/RedNode@Pro.png.meta index a07bbe66..750eb5fb 100644 --- a/Editor/Nodes/Fundamentals/Resources/RedNode@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/RedNode@Pro.png.meta @@ -24,7 +24,7 @@ TextureImporter: heightScale: 0.25 normalMapFilter: 0 flipGreenChannel: 0 - isReadable: 0 + isReadable: 1 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 diff --git a/Editor/Nodes/Fundamentals/Resources/RedNode@Pro.png~ b/Editor/Nodes/Fundamentals/Resources/RedNode@Pro.png~ new file mode 100644 index 0000000000000000000000000000000000000000..243dced8f60f4c5034409f83ffff12917bbd3e13 GIT binary patch literal 435 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|R5K zr;B4qMcmujXFZt%8Co`L-DpT)K6ax)UHhXdBW|_ubq2KH+@yM;rfb@!zMe*5+s0fARR@cis{o>Mh>? zdKl)q=PJ{+Dnq@O|NijYJ^1GF=1;jH2X9PIjyU{6e;NJDiM;Y!5S_?AY_+7P2;(>LNdJ;o*yuUbe zjr$uHo`mr2mgj@)Mq$H-z3Z2EGwxF^Q)1ij{cDNgf$}3H8`{Na zE&o`}i_xETy`|5IrGHhkBgCEUtae|zcyo2sfvu-1FV;5B|IfZ*&eV6I2VO61sCp^! nHs*Zr-6!?!I}iLmwTHc5+wxtbP0l+XkKQbxwl literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/RedNodeSelected.png b/Editor/Nodes/Fundamentals/Resources/RedNodeSelected.png deleted file mode 100644 index a336b855850460fc9eb74e214f23f5072c8f05c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2107 zcma)-dsGu=7QiPWPXSQ@*@}{i?F4EvNnpT)gqHyU!yCmG1(M7F+2%zuF@dUJkc!2^ z0`jULpe-D=qJU7PLaBDGy2v9|)&{kJ1;G`l&=sl+?j&%q?)HzKIWu?e{qFsJb06QC zBN1WStSsKL006)$IEWL4OJDtMW`aM@2vZ;8!dw>gz5)QOzti7@;`glA0f14gFlHCF zE0oI=NW~N$BITnLwOEFG0|3iME#nD3L@^>CO%_Vn;N;iefJ7m}24mq+YN%{0nj#EJ zm!r|?VKIXA4+RVa^zpV}shK!HjAA^ZS}c+%m})j?;4<-dy%_>=CpnVDjN$|?y5Jfc zOu;Z26M|GK6-DJnk;;=H8iT=rsC0-X|&gREe=c(1N&#_QNo_kiSHiC@4IGMX3*=;7LO~L;=w#RQ+cWiL3>GrXQlvs|%Y% zqp1dEK@$lLJIQ!*1sankL)l;ys*oz>0@Ogz2Q5Oj%26JMBHnZ=9VXLgWGaIN{m+tq zkJkYKYAhJ>MrcVM?lhQAMv^>uWOtZOBlD-7Y&7J1SfVWVW0t}09`o~C>f)sr!-mkf@Z3bT!q_3_>xKI>>vRIWR@IuKJ9DmoA zKi?`uu+%1*QZ6!#03v`;5h_L{n7&E0#U>#FCMLv0=<62wiLf_YgwGyR#FHemK{Xjc zlXyxI271%^`in>=(*7WyMFb1_9sLioSuo+Vi%&7MH0!vsbXrgeenjN>S+M_YcrO4f z|0I~>7o)BiKi(hSk2-u`WxMu#rqVH_y#Gc;*Lv3Gved$c$m%`+sOgcDj%k;Xd$c9d zr!$Y432sD;SXj^#MLBiVCMHJr_g;SGEB%yqeO=Lma*;SK;it#3htTWW*JKR0&DORF zr&(1qFIkh5Lo>#0LL08#gTe;4FY$%SqXjd;xH@n7ul-{VyAqIg*+zA=ip3 z?XMHvV_uaj-1GNCDV4V8rs8~RO7FXEy8Sh$$x9j;dS`aBxj4S~`T-+~vTNJ7-L{E8 zkF#ct2aE&9B0Wy28pe}uoNF+tiw}2BaQdix-%D*|t$^gZ(Hw@Hg5Oq!Rn%N7|4iJL zHtMoLbWl*(=a6pMIb1DyD_>(dx%yaN!k+I&;M3mH}bAe6xgwrSQs8G5t^~cqnqw$}gvG-{%Y5j@5LrvhOhqqj11lZM|?m1T^{U-E*lTceR&fx)3n%on$lUh7r&f;GV(0aV^;U^N_$ygYmD;XVbfD%AyYh! z58vnBTozpL*RKxrt?-J_NM>D!?M})zS>UYbj`p*tR0C-#At$f?2$X<$L$f0}IWk$OzEDca-7W&{448}qDyhox%t z5MdJsnbsgYK-3vrb<*{3BXgQP)6r&$k_2G3pYRb-@(W`d;Hv_9f=n*7m}X88Y#gcG z1R3B6n0EZ1c$MYP0IV~O27oPpQp`fY)0e93nVbDX!HpSL$n~-sBVBU#m5!+bHc((T z_`YdkJg~kR<635FCqM`CHOwwBWaFw137OE_km~lA=x*%}#HUNe4{EHfg*qHF3C^8X;|#w;)D!39 zE@Vvc-d?3*|9fa}?PKd5p82ny{dmNa-%(nh7wwslag;I|b=No}$17;EA=20EtSD(G zhr-PryeY7sdVV(f^sR{uOKccMtL{ESuGiz}5kM7b^SFSmOi`D>oGyO#`T z@2#>cxC(DSW!}Y#o49(j>5CcL2l4mS^|*5WjAB>Ceo%nk&!u7o8b4u`4Xz z>(e}@(`@*{B{Mb9>{a3O^S`dT61n*1qKl7%zsDwiw}1Kb#<}I^Bf~|-IptqPWW|fC z{g^XH{%?W4^0(=4#kJ=)@A&`D%(eQ${=M9_3rl6wm%iHn^3x*)yYOwMigNe$?;M#g z^2?B?AkMa&S%}Tzx&4;O3_=O-7&vCIH`qH0FfbOgI~=fKC}E@qvvJD5xxO4MNm(YP zZJgcT7cbs=a`WN)L2pg0q+S1Adh@||o^0KPZvVI1lT};}sy{qr$XJ=#x8qvvn%JW9 f6`?<`uldOkqHUnjVYam%7{Uymu6{1-oD!M<-Hnox literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/RedNodeSelected.png.meta b/Editor/Nodes/Fundamentals/Resources/SelectedBlueNode@Pro.png.meta similarity index 82% rename from Editor/Nodes/Fundamentals/Resources/RedNodeSelected.png.meta rename to Editor/Nodes/Fundamentals/Resources/SelectedBlueNode@Pro.png.meta index 470b0945..fbb6b2ae 100644 --- a/Editor/Nodes/Fundamentals/Resources/RedNodeSelected.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/SelectedBlueNode@Pro.png.meta @@ -1,10 +1,10 @@ fileFormatVersion: 2 -guid: 3e0ce420930779d4e9d57b1d9cdfa23a +guid: cad06512472950b4a95ac0999b0372f4 TextureImporter: internalIDToNameTable: - first: - 213: 5886926472829903730 - second: RedNodeSelected_0 + 213: -8904278001803723941 + second: SelectedBlueNode@Pro_0 externalObjects: {} serializedVersion: 13 mipmaps: @@ -37,7 +37,7 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: 0 + filterMode: 1 aniso: 1 mipBias: 0 wrapU: 1 @@ -57,7 +57,7 @@ TextureImporter: alphaUsage: 1 alphaIsTransparency: 1 spriteTessellationDetail: -1 - textureType: 2 + textureType: 8 textureShape: 1 singleChannelComponent: 0 flipbookRows: 1 @@ -75,19 +75,6 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 4 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 textureCompression: 1 compressionQuality: 50 crunchedCompression: 0 @@ -97,7 +84,7 @@ TextureImporter: androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 4 - buildTarget: Android + buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -113,7 +100,7 @@ TextureImporter: serializedVersion: 2 sprites: - serializedVersion: 2 - name: RedNodeSelected_0 + name: SelectedBlueNode@Pro_0 rect: serializedVersion: 2 x: 0 @@ -128,8 +115,8 @@ TextureImporter: physicsShape: [] tessellationDetail: -1 bones: [] - spriteID: 273aedfcf6092b150800000000000000 - internalID: 5886926472829903730 + spriteID: b5bf9219556ad6480800000000000000 + internalID: -8904278001803723941 vertices: [] indices: edges: [] @@ -147,7 +134,8 @@ TextureImporter: secondaryTextures: [] spriteCustomMetadata: entries: [] - nameFileIdTable: {} + nameFileIdTable: + SelectedBlueNode@Pro_0: -8904278001803723941 mipmapLimitGroupName: pSDRemoveMatte: 0 userData: diff --git a/Editor/Nodes/Fundamentals/Resources/SelectedNode.png b/Editor/Nodes/Fundamentals/Resources/SelectedNode.png index 18681aa7199c650f976596bfdb1079fc43e86f7f..54189f5ea43c4d69a632dd87228e1d27970ee655 100644 GIT binary patch literal 400 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|TRz zr;B4qMcmujhJH+r60PY+nE@k`I`s{Wtz#p2CA?KgE(=FR{5C3i|`XyL>U(Xz#F z9TS_*pS=0Hon3O{&Yb-}uHEeaef)3eMLD0a_6y=s(+k5^{hO|r%>HrbrnQ_OEp`_O z*9W~=Zg8OT>m6PXi3fB3U+`n{XxPcDkRZqKkHwLJ<%}!?<7b8otPa#*2K_2EQxxb} zdGU&*n$ErczH4gd`Q9(Nm04oewdd-a55Dtc>#lUSe%tCPwCKV5hllE!K3$S2T>E=- j*~z;L!=A=(dS<_Grr|8@O0Ohf5HonX`njxgN@xNAo2aAr literal 2008 zcma)5c~nwq6n_FHnOTjdlBuW}mB9lH6%^1y(@a~$OwXjUJd{E}cqG}PS(@20xnQ9?LoX(R=56-@Etw-QWH0wsU#J;>ngX zECB$R92&w|iR=M}g`I$W&xuoBBilrINQ@EytnV0>na0!F5dhH9V(w~qb@)<-K$cA6 z31xhUq)wJ2XaMkMtK~ewIta$|p+vEiNqAp%gMb$cnS^LsI5}Lt2uc!%q$!}tvP3<%5U>6y~XkQl&e>V2L+!a3G~XA(q2pnG|o}DGMJE%ph2Ec2~tR8!?o~ue-oY&C{!9mlaoj&#VD90 ziP-2#&QmBM?glx;B&>v#GL=FA85s;lqa=$I5D$igEGn5wBT^_tGTk5i-;u$`SA!rm z94cgq=rkW+NaRHn3dlm@f(2e=B44zCPxSF7`#^ju+1pq2mB?f=o+g-&u+XS9syB^J zSwQij(|pNeo{fj&@m!fokYosjMID2E)fut=pdq^wu_-A=VKgga7N(S$fZvqm$4ey? zjFm~QQb>#~AQXU*1WJaau%Sql(IN>23|I_Hpsytgl)&Rlg!CRm!jmR432LGc67f_L zn82d)4KJREr+g=#Q3`+X8}{!+V^Sf#i*zwK*6WBcHZ71884(3C3q#F)Rset@gmMD8 z>cjnqb;`&n+j`weYI#dmdgdgJhHZymvegb7xo>rnQ|YN(v=jH>X^-K&li}C|&WpUg z*vNuGPqriKs>l6}q4S`&i^}ZDAdy5mhd((iHG9diaYyHnZDp*5}c5x}M`-q)R8 z)@)uK`{?qnV*iKsx#yS9AK({Y|9PaEgmEceatIqJ85~%*_yUl#wWQM-cfFV*12yNT zbi1udSD-IFD_Xld-nNkEBdn{itLsfZ-tq2i!y&o+=M6diE;eQHb8*X}wp81wU*qRv zJ+w}{W|bBz+n?VdV`o^E^!(=FkeyT@3agox`Bu7RH0-1uU|VqXGadV1@@U8NgHk^+Q62 zYD(dF@X#{Adq|e$gUQIY{%jvmWq#A<$`C4vd=8xyjMe>X-t5smGj9?8h(qkd<~3PG z`65hnhr^|Ygm=GR)z|plWgltD>=-B=Y-Uo3@$uDBUQ21D*!LYrqX%d^+j9T>YkS4z zTAS|Sc8`sn&D+x~!}F^ zwy7Uqs}da;?)y@>A=y9$Bql!HsLEs(;pRvAIwCB{lsO zwjVj?1858b%wZ z*VUS}qRZ@WZgw?C<(}BM5?%bT$IPWF`&7|L2+G^#2CClee&bOLO;&$q=51Nn`c~%) zwtXK;Z@DLSz1rVe3NotmHJ&4DkZBEiI)4cLj#M}+=E2-20P=(eMR3X&CS?8xwQ~y& diff --git a/Editor/Nodes/Fundamentals/Resources/SelectedNode.png~ b/Editor/Nodes/Fundamentals/Resources/SelectedNode.png~ new file mode 100644 index 0000000000000000000000000000000000000000..18681aa7199c650f976596bfdb1079fc43e86f7f GIT binary patch literal 2008 zcma)5c~nwq6n_FHnOTjdlBuW}mB9lH6%^1y(@a~$OwXjUJd{E}cqG}PS(@20xnQ9?LoX(R=56-@Etw-QWH0wsU#J;>ngX zECB$R92&w|iR=M}g`I$W&xuoBBilrINQ@EytnV0>na0!F5dhH9V(w~qb@)<-K$cA6 z31xhUq)wJ2XaMkMtK~ewIta$|p+vEiNqAp%gMb$cnS^LsI5}Lt2uc!%q$!}tvP3<%5U>6y~XkQl&e>V2L+!a3G~XA(q2pnG|o}DGMJE%ph2Ec2~tR8!?o~ue-oY&C{!9mlaoj&#VD90 ziP-2#&QmBM?glx;B&>v#GL=FA85s;lqa=$I5D$igEGn5wBT^_tGTk5i-;u$`SA!rm z94cgq=rkW+NaRHn3dlm@f(2e=B44zCPxSF7`#^ju+1pq2mB?f=o+g-&u+XS9syB^J zSwQij(|pNeo{fj&@m!fokYosjMID2E)fut=pdq^wu_-A=VKgga7N(S$fZvqm$4ey? zjFm~QQb>#~AQXU*1WJaau%Sql(IN>23|I_Hpsytgl)&Rlg!CRm!jmR432LGc67f_L zn82d)4KJREr+g=#Q3`+X8}{!+V^Sf#i*zwK*6WBcHZ71884(3C3q#F)Rset@gmMD8 z>cjnqb;`&n+j`weYI#dmdgdgJhHZymvegb7xo>rnQ|YN(v=jH>X^-K&li}C|&WpUg z*vNuGPqriKs>l6}q4S`&i^}ZDAdy5mhd((iHG9diaYyHnZDp*5}c5x}M`-q)R8 z)@)uK`{?qnV*iKsx#yS9AK({Y|9PaEgmEceatIqJ85~%*_yUl#wWQM-cfFV*12yNT zbi1udSD-IFD_Xld-nNkEBdn{itLsfZ-tq2i!y&o+=M6diE;eQHb8*X}wp81wU*qRv zJ+w}{W|bBz+n?VdV`o^E^!(=FkeyT@3agox`Bu7RH0-1uU|VqXGadV1@@U8NgHk^+Q62 zYD(dF@X#{Adq|e$gUQIY{%jvmWq#A<$`C4vd=8xyjMe>X-t5smGj9?8h(qkd<~3PG z`65hnhr^|Ygm=GR)z|plWgltD>=-B=Y-Uo3@$uDBUQ21D*!LYrqX%d^+j9T>YkS4z zTAS|Sc8`sn&D+x~!}F^ zwy7Uqs}da;?)y@>A=y9$Bql!HsLEs(;pRvAIwCB{lsO zwjVj?1858b%wZ z*VUS}qRZ@WZgw?C<(}BM5?%bT$IPWF`&7|L2+G^#2CClee&bOLO;&$q=51Nn`c~%) zwtXK;Z@DLSz1rVe3NotmHJ&4DkZBEiI)4cLj#M}+=E2-20P=(eMR3X&CS?8xwQ~y& literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/SelectedNode@Pro.png b/Editor/Nodes/Fundamentals/Resources/SelectedNode@Pro.png index b36bb76fa1c4a9d69079d7bbe7147321fa86207f..fa9b0678fe45104d9be658715def1280b186ebe5 100644 GIT binary patch literal 393 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|TSA zr;B4qMcmuj-hNJwA}+gImvSVYxYJUaAtU)m_1IMbwkARMmQn-t!c}>$&7~97WQEKw zlv=&qQ#ar9>e|omUOWp~d+~G0y4$yZMJ7L&e_0vtKkr@FIvIA({TH74?!G_cL2%K& zuaCUka(4aJ7u)si(Vo8%rf(hP;@b9IkaDVyyjp+p;XTJcir@aL9jUS{7OoF@G27rk zW$7JW4~YkJ{$KE8@@Uw}tdJnbP}iiu!1Ro-p`nuD1rt@6nt!ck3ve8{l5xvFB&s4X zbMEw;5A`+6rRMfJ)n}De1f;dE|C+F}Hg8gk#*fE(KTDsPy4zg-8?pQ8JA>e-@?G!j Y6}}iS9bC3i1{k&sp00i_>zopr0PIDeLjV8( literal 1985 zcma)52~ZPP7+xR}1px(56bMqyC~P)a2r-d_Qy?Np35epEO;(8HBH5TjuBz2hi-I>u zN1#GIz>!N)TLg;-Uf_jjK|wimpdLg86lgbrLG3ux?#_E}|Nnje_xAt4|7{Ns3$n7X zw*UaZiW?jdfv-M>G1eTPPlytp;LA99@Ny*pSl1Ya$$nSs8314wEs9)*Eel=D638SJ zzEFms6pciVqXEFnTO;QS;!%u*ps^w;oBaC1MKVbwWRs)mq0~^hKN=?r)+tb)E-X@@ zix)73WN(gzmxhHCNKlMV(n!QoB}>C58+lpyx4{jOagai|jujCQI0C^fHaQN%J4L35g=kDB6QaTp41+iVRBELdUjs^&E;xe)$;c6aDg_FW923c;Bm*ZOk*P2? znQTECq4vcvg$NmCmntcIqeo>3q2NhFe4!GeQK*LBB9Xj?@ho4V(qIlB!b1~`#;_$8 z8Bdb)6-qQxD@WPn2vjLkDFmpI!4Nb;;;%sY7%JqzRG1FZXdsp81^sKwaK`6=g&K@2 z`ng@-+ zq|c|01{gQL#z)Fjf;dAe9C#G=*=NLhL5AvzMZ-lg8Y5L1jTkQ3Fz^dm{=Za0!Kh4f zl|pQ60iggw#i#_8Vg`|DBO(a}EKG!n(a#e3im|UH!h4S;=1XJQWDO`p*YQxtcIjHm1t}318+07Qufm2i2uF5Rk6>a%}FmM^1CL`vD)^ln&7(R-#b&F zRd42j1#JuB7rn16Ig}Q;<58D;m;K}o9V>$}qN{j>+_Y1rE$#gjdcusd+$gfglGmy5 z=?ck2`_;|w%?~fGj=B|~PMd2{zS6YxY*RtFK5OodS^Bd!Q}fP&TP4owjxgfJ4qzjv zFxFFZPS*Y4MwY74 zInEVf`>pj(&c!>3Lr%xBskJrh(-V_qPqZE*|dxoWGDw!51BI>$O~ z2T{As_687^01O6VI^x3tn(3QDQ)|<;pMXZ1N!3`ugai;$feC=A5Aa_`PLHqcw{U$a zz|2qTA9oW0kI1vala<`<;7iN9YV{+C2R*~`AmNf;OGoo`R>mwrGl5C=E?V2dO zUFc8O+Smm(vYVT;Rt{N-vPDwY16I7CTIgN2n|>cGkKY~5vBWxbK3uo3JT8p&pKxwC zUmRV}cvomEwtU`Sp+)Xcp6|?t0t;UKvb_h&bsm5&( zo8EoXH)M#IexcxU{r)aqVtCuzr+e7t84m*=>eoN}ka$`>l=ofG>Nap~GrgYO75qwp-lpfH0RC_nh6SARTf6BW;W7q4 diff --git a/Editor/Nodes/Fundamentals/Resources/SelectedNode@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/SelectedNode@Pro.png.meta index 14382cce..98d03d70 100644 --- a/Editor/Nodes/Fundamentals/Resources/SelectedNode@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/SelectedNode@Pro.png.meta @@ -24,7 +24,7 @@ TextureImporter: heightScale: 0.25 normalMapFilter: 0 flipGreenChannel: 0 - isReadable: 0 + isReadable: 1 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 @@ -57,7 +57,7 @@ TextureImporter: alphaUsage: 1 alphaIsTransparency: 1 spriteTessellationDetail: -1 - textureType: 8 + textureType: 2 textureShape: 1 singleChannelComponent: 0 flipbookRows: 1 @@ -70,11 +70,11 @@ TextureImporter: swizzle: 50462976 cookieLightType: 0 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 - textureFormat: -1 + textureFormat: 4 textureCompression: 1 compressionQuality: 50 crunchedCompression: 0 @@ -83,7 +83,7 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 @@ -96,7 +96,7 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 2048 resizeAlgorithm: 0 @@ -123,6 +123,7 @@ TextureImporter: alignment: 0 pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} + customData: outline: [] physicsShape: [] tessellationDetail: -1 @@ -134,6 +135,7 @@ TextureImporter: edges: [] weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: @@ -143,6 +145,8 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] + spriteCustomMetadata: + entries: [] nameFileIdTable: SelectedNode@Pro_0: -5372993062516891770 mipmapLimitGroupName: diff --git a/Editor/Nodes/Fundamentals/Resources/SelectedNode@Pro.png~ b/Editor/Nodes/Fundamentals/Resources/SelectedNode@Pro.png~ new file mode 100644 index 0000000000000000000000000000000000000000..3c638edb078a8545597021907edf1f4718863a48 GIT binary patch literal 1085 zcmV-D1j74?P)z+}v~BJ-a*OtZ1Q9 zCC=MUX5n!5Vg6;l%m2^Ie0W92Da2|OC_nCIlUMFV#s2PZjCB2e40I!yNgGp&-ah!< zOAP*bv`5Z4;M$8mx-MlBn^H**{ z12;P9f_-PM({#g^oP}X^;2-Wizelp*#!2-L3RSkJFnijfz-*Xm3KEcCe6gLF>B~S( zf>$58gxt}=pNwqN&d@D*g}=MZEcKND{yrmK(}Ez?x}1g;2YDk;76VQ6ko@%7Uz@ql z&LW}wtJ}ZOoDnJsJ|crwUVC5gZcc9 z!Tbs$c5cmB&(%4A0oF$Y!h6y8@3@cg)En2t(NYeHc7Pmj>QqGzm}obp|D)anZviZBi;HO4#Jevo?uSQ_I+2V6Cc+XT zBRHYjAc_cybX*jp8o7@ zGV|Mxs$X#)iWKEGE8hk#BR(k(l5u@8MvF?Mp5>No@F9`5g7T}I4=x_<@Q3d)+jIU{yzSh#w=E?`;)}W6n$>n#qIFFpWfgA5;pzjrQHz znw->JB$f?t@8jX1;%pNNB9V$k%&QCr z)xw$lx~82x^7Te#}rc|y$O9lLqv+Ctx-b4enzPW)0}STV(q z-yC(!EA!AR^%n2{(be$zRdBW|_ubq2KH+@yM;rfb@!zMe*5+s0fARR@cis{o>Mh>? zdKl)q=PJ{+Dnq@O|NijYJ^1GF=1;jH2X9PIjyU{6e;NJDiM;Y!5S_?AY_+7P2;(>LNdJ;o*yuUbe zjr$uHo`mr2mgj@)Mq$H-z3Z2EGwxF^Q)1ij{cDNgf$}3H8`{Na zE&o`}i_xETy`|5IrGHhkBgCEUtae|zcyo2sfvu-1FV;5B|IfZ*&eV6I2VO61sCp^! nHs*Zr-6!?!I}iLmwTHc5+wxtbP0l+XkKQbxwl literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/TealNode.png b/Editor/Nodes/Fundamentals/Resources/TealNode.png index ce3c93bf6ea5ba66011b9c52c24ca752d1e59c12..d86c68851450b9d162a97eaf18cce46efe82cd35 100644 GIT binary patch delta 406 zcmbQie}s90MLlDgr;B4qMcmujd;JbO2(-L!pVg%0G)2Lc>7vq$mybR$gdFK$>HMyE zV?n@$K-C?~-7YwY`#3r?_d7gFzOHfNkziih(#hwaXFYrNIV`*P%D1aW_Aa^mYKcZs zrR}xN9@%QU)@}ZN!93k_snpwRPj9^4`e)r6_f2L>qW|K^=blM0`dqen1R$lnKu+G@lTRN%aVdZ zMM>*LY>?o=$8gmglpqd5gm`tF6jpH5Jc5CjgMRDX6aos8gJMpI&%y}^YVioM2qNQ9 zC@PhTta2g8%VQ`sHk(bM(kXO02}O_;i7+BmlVHU>lmUY`aQHw9kz67}B=Im_&nb+K zS0X$D0fV2Q_CgT3Bzlq^R*;1Tk5V5(Mw6xpK?Q|Irs{tSkLQl#IbNVbZ;l_b3`#H< zw^r87x18i~s0QvS82KjU+N zuNqkd^4&nt#RY=sBv*(jCNacrA`+V|av?E9keKcQF@#i*Hc2!d@-@xEXq1IXXVO_r zHjP1ZWi#EVlL3a!ukoSrN>Qvn6+V3u_St8^aw+=iN+sh(F&Gn7nT!}O**NeES-xE= zP&6r%OevQdS^yMLASo0F!H8ZY+Js1;h=WKFDfC$)FDdf1L}>4Eq(V4`M^KYMNGw!J z5dxnct-tXkJX*j1K0b&F%2DX|jhtb-2JIj*hm1 zsM3L#clu#f2kAyw=lja8fY}%vmaT5fi0Rp$mT9`-QCG{m4dUa>p?ub*)bznmO`lkU zsoK%16E%F?(9C|P+~NDaQ*@losq?v4>uz=YXg$`@dt}Ss`=q-c?7Hqz(tlxp^&Xv0 zdv^GK-m{e3iV$~d_>Q^@RI3`lb4e zt`c85xaL9OqiJe~yd$Y;oM_dI{c%IaIAojU@1elzbFVEn7kC%=~`Ich&5ePI!f$rZ@28&!X1+z>&z~tUu$2i&8IT_&2HKsa7^GY zp_z~NC2FF~S5H&h+;s+Q)zC;o_euEA+}mbvAUxF}tW6>S#9=sMi_m!W)n8d5`lHI64qbJz1^Xria4yoIq3!EwD6x=1a+e|-o@qe zi+N^NVc3!8ShN0;X+YQWfa=2Ty_hO$zfjY7?wBC_WWcpUwWGs*WiuSQwztfz2wUnI zoE4K{PW}FX^<%$=UYa6mp;5|ZbIQ?#wpb&NoDS-ZvJA;AO;-SSpyvc{KKDbNs@)I! mbKB_)WodU^s^=blM0`dqen1R$lnKu+G@lTRN%aVdZ zMM>*LY>?o=$8gmglpqd5gm`tF6jpH5Jc5CjgMRDX6aos8gJMpI&%y}^YVioM2qNQ9 zC@PhTta2g8%VQ`sHk(bM(kXO02}O_;i7+BmlVHU>lmUY`aQHw9kz67}B=Im_&nb+K zS0X$D0fV2Q_CgT3Bzlq^R*;1Tk5V5(Mw6xpK?Q|Irs{tSkLQl#IbNVbZ;l_b3`#H< zw^r87x18i~s0QvS82KjU+N zuNqkd^4&nt#RY=sBv*(jCNacrA`+V|av?E9keKcQF@#i*Hc2!d@-@xEXq1IXXVO_r zHjP1ZWi#EVlL3a!ukoSrN>Qvn6+V3u_St8^aw+=iN+sh(F&Gn7nT!}O**NeES-xE= zP&6r%OevQdS^yMLASo0F!H8ZY+Js1;h=WKFDfC$)FDdf1L}>4Eq(V4`M^KYMNGw!J z5dxnct-tXkJX*j1K0b&F%2DX|jhtb-2JIj*hm1 zsM3L#clu#f2kAyw=lja8fY}%vmaT5fi0Rp$mT9`-QCG{m4dUa>p?ub*)bznmO`lkU zsoK%16E%F?(9C|P+~NDaQ*@losq?v4>uz=YXg$`@dt}Ss`=q-c?7Hqz(tlxp^&Xv0 zdv^GK-m{e3iV$~d_>Q^@RI3`lb4e zt`c85xaL9OqiJe~yd$Y;oM_dI{c%IaIAojU@1elzbFVEn7kC%=~`Ich&5ePI!f$rZ@28&!X1+z>&z~tUu$2i&8IT_&2HKsa7^GY zp_z~NC2FF~S5H&h+;s+Q)zC;o_euEA+}mbvAUxF}tW6>S#9=sMi_m!W)n8d5`lHI64qbJz1^Xria4yoIq3!EwD6x=1a+e|-o@qe zi+N^NVc3!8ShN0;X+YQWfa=2Ty_hO$zfjY7?wBC_WWcpUwWGs*WiuSQwztfz2wUnI zoE4K{PW}FX^<%$=UYa6mp;5|ZbIQ?#wpb&NoDS-ZvJA;AO;-SSpyvc{KKDbNs@)I! mbKB_)WodU^s9|F zG0#gsxvBi-=`-_>+y7M)&A$3w+E(vW`P94TFKvFCwmJ3M)g!KlmRs%Ha(pW1KmT){ z_BN+G?tb`pbo;r$JKtZIUX}B?W%i}@+IG?W zUP)qwZeFo6&;%|8uo*6?#mPmP1tppJc?uvi6O-~wOKjEExfGyAJC>9bWhTK*&nwnT z1dEh{wCDjnt)G}utZ%4i0CJXsf(=Bym19aVhzqeKIJFSWf$(xN!8R2n78R$4R2HP# zst2VO=a&{Gr-DrYX@VN!T$GwvlA2;?WME{fYiOuzU}2+=CIzwsp~1DH#52Xt%+%Z@ z$uK!p*CaXBNY})|FikhnDA80mEiKI;DLFaC(7@ajZV*HZsxfX!KvPVOOpVM;Ee%Z! z%`HtW4B#5TlBnuK@=KF5Kwhykf-6Iafz{gRgF-ha6A~z34m4EYIv_y?QHT^R#79+1 zGCZ0JN{e#9NgyRzKQ$*cH#M&W6iJ5ANJ>ezD#9%FMGL*bmG<+jt=R&&7ww`;$$V`@4IuULEP^$$45^$EQ=by@C*PZMb99*hb-66K_+DOEx4C8Cw2&~Pug7|0 zW=}p`5~X`NduzI0MboMBm^O$;Cb+viU zgP=IM!}f|BOW6O_YfkJ|F?`e3bSX$}nzeY>)j8J7nP0znkv^w3r#9#J(~zI>Dhe4_ zv%<=sdWjU9ef>I@<>Eh{?W%gbd;N}Il6xZL)x#tnd+u9F*{K}@YY#4v{xIjbvNEHC zPHzeO&J>~K2@D(RY**Wq`Mj(6$n^al7t@4S4e|^f)qYG2{!9Ow zI2afe7+COf8n&=|VpI2EJHw2*u{Y0iS%;rGeChwsEf!@Cr}Q_>VO(OR@KW4ix{tTU z6SiuNBNw9D-f3-_vc&p?>Qt4&+%mJ(mepZ-^JhPvws0Z$1skJJa(9KT&pfl(wR#fU z;xFvGO}u6-m#WZ1niGHL z8%sTY`}uQ*;Gg9i7A5h%DX_RED<%KGCpO?|k*n!!bNxOhCjnz+&6tx(YI`O`m%np4 z{~&x#-QQm6dDmu2GGr?-u>bzun=#pygIzCf%IEHGVLqcT0*|iwbb%65cUSh2Gm9BZ zcApdx_kJ&3R$XlH!%A4eIC?GHi>lvYttwJ^cQ-9sZ1i-ENz6W(wXa@H((ad=`te4< zqJrDk=U6J6-`OLXE#8^@bnW8B+_&F+yZZZ1p23%Is~GH$$L~EQP|kSc`sHAiX^-Yu zh(7Y*vSvE(ebh^))Z%>x_cni@nk_v1|KC2BSyf%Npf157RZfQG!n5bhQ72t5NhWC@ zI%%H2;M(Jh+*x`XHSX{gMjnu!e5qx+Okha)<+r!ReXg&Yx$WKE-ChnJPrBA~3m9B5 b<^InkxjLLt)@+I?0}yz+`njxgN@xNAtP~7l diff --git a/Editor/Nodes/Fundamentals/Resources/TealNode@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/TealNode@Pro.png.meta index 8f64641f..857eaff3 100644 --- a/Editor/Nodes/Fundamentals/Resources/TealNode@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/TealNode@Pro.png.meta @@ -24,7 +24,7 @@ TextureImporter: heightScale: 0.25 normalMapFilter: 0 flipGreenChannel: 0 - isReadable: 0 + isReadable: 1 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 diff --git a/Editor/Nodes/Fundamentals/Resources/TealNode@Pro.png~ b/Editor/Nodes/Fundamentals/Resources/TealNode@Pro.png~ new file mode 100644 index 0000000000000000000000000000000000000000..b0c7633d3f258bef49a62960a365ddf98aafbad6 GIT binary patch literal 460 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|R57 zr;B4qMcmujj(&#%Bw92JL`)0V)?MJ12zPVHJ0Mxb(iIri!d$?6-DL-t%DMX=PIxz; z%$e&qxh?AWQS;A&;p<Ladeu?FH1^`b&64y*55(^B#E;(MVQf$eYVdYNW< zhyJd<|FoyHK-=Myx4*+qhD9nbJ9sC|o8GXQ(Z%zUptORmK4Us_$D}37W)4+xOy}4H zR6X5u8oumdnZv8#HL33g!^=ue3u%WbDzY0HFMSp&Fl*58v`S)L@?7;n4nyFik|S&$ z=e-ZyB+uX-1`mXGUaPcvc27@!FF!|CZt3R3 z`V||G{=Fb5ob|0 z@7#OOy!+lAmD3o_HryiWxE($hgQnt)Vw~tN!^5yU9vh>uss&AlRl}{uEcqj->{l!} z{y6c%Cd^DigBH7Tuw@H&pTXZTs6T~)$*2y*`)-)sL?Q1t68~*1tS-g4TD0E7FAaG9 zCHnb{3>@Qvyr>O$KLLNO$LeVG97I)*6cCq5M~yqS7;$zyYWJg4#s3xHTtdG4BHTU$ zZGlkYj{%pRnJ`iwu}1=NVL#Syl?8PeqGn*41&fL?{~>OWN3G8w-|`$ylknCzjJbky za^(q>>zJS{4Eo~ra~FtKw3x*8nvHW9m+uv^}# z&It~AGF~%{eruc*VDY9ycVYAb?#cbWOUnB_*~C8|OJT8Cu@@h7DD!Q1h`r^!Xo-{p z+7@ubU}bOC>{1Ri9UxABjaT=eS-zIqG~$zTa^}gFeClLA51D^wA9=d<__S1B!h=sp z>Bw(GOA=<} z;bM8)T`QGO=HG~XuP%(0!fqTPwjRUXDX9D4@Lv!r2grFjc;=sGiRuWvV#QkdQyExA zJhTk8a`vy-Mx2<1`pH=1OdY~S%?W%apKYa{xV@cUK6uu#kUxuN V95Mbxyy*Y{002ovPDHLkV1gf~fUy7o literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/OrangeNodeSelected.png.meta b/Editor/Nodes/Fundamentals/Resources/ValuePortConnected.png.meta similarity index 81% rename from Editor/Nodes/Fundamentals/Resources/OrangeNodeSelected.png.meta rename to Editor/Nodes/Fundamentals/Resources/ValuePortConnected.png.meta index 835d72f7..72c8b5b6 100644 --- a/Editor/Nodes/Fundamentals/Resources/OrangeNodeSelected.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/ValuePortConnected.png.meta @@ -1,10 +1,10 @@ fileFormatVersion: 2 -guid: 867c13fba689c6f499fcead401eb5ad2 +guid: b2acab77fe60588489cd95cf17e5fe0f TextureImporter: internalIDToNameTable: - first: - 213: 6660117862059659321 - second: OrangeNodeSelected_0 + 213: -1151656034708878851 + second: ValuePortConnected_0 externalObjects: {} serializedVersion: 13 mipmaps: @@ -37,7 +37,7 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: 0 + filterMode: 1 aniso: 1 mipBias: 0 wrapU: 1 @@ -57,7 +57,7 @@ TextureImporter: alphaUsage: 1 alphaIsTransparency: 1 spriteTessellationDetail: -1 - textureType: 2 + textureType: 8 textureShape: 1 singleChannelComponent: 0 flipbookRows: 1 @@ -75,19 +75,6 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 4 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 textureCompression: 1 compressionQuality: 50 crunchedCompression: 0 @@ -97,7 +84,7 @@ TextureImporter: androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 4 - buildTarget: Android + buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -113,13 +100,13 @@ TextureImporter: serializedVersion: 2 sprites: - serializedVersion: 2 - name: OrangeNodeSelected_0 + name: ValuePortConnected_0 rect: serializedVersion: 2 x: 0 y: 0 - width: 64 - height: 64 + width: 12 + height: 12 alignment: 0 pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} @@ -128,8 +115,8 @@ TextureImporter: physicsShape: [] tessellationDetail: -1 bones: [] - spriteID: 930dc42a8ed7d6c50800000000000000 - internalID: 6660117862059659321 + spriteID: df90ebb20fe7400f0800000000000000 + internalID: -1151656034708878851 vertices: [] indices: edges: [] @@ -147,7 +134,8 @@ TextureImporter: secondaryTextures: [] spriteCustomMetadata: entries: [] - nameFileIdTable: {} + nameFileIdTable: + ValuePortConnected_0: -1151656034708878851 mipmapLimitGroupName: pSDRemoveMatte: 0 userData: diff --git a/Editor/Nodes/Fundamentals/Resources/ValuePortConnected.png~ b/Editor/Nodes/Fundamentals/Resources/ValuePortConnected.png~ new file mode 100644 index 0000000000000000000000000000000000000000..cfd25e6156fa3e344c44261b5f94bf1c53fc2589 GIT binary patch literal 843 zcmV-R1GM~!P)|0 z@7#OOy!+lAmD3o_HryiWxE($hgQnt)Vw~tN!^5yU9vh>uss&AlRl}{uEcqj->{l!} z{y6c%Cd^DigBH7Tuw@H&pTXZTs6T~)$*2y*`)-)sL?Q1t68~*1tS-g4TD0E7FAaG9 zCHnb{3>@Qvyr>O$KLLNO$LeVG97I)*6cCq5M~yqS7;$zyYWJg4#s3xHTtdG4BHTU$ zZGlkYj{%pRnJ`iwu}1=NVL#Syl?8PeqGn*41&fL?{~>OWN3G8w-|`$ylknCzjJbky za^(q>>zJS{4Eo~ra~FtKw3x*8nvHW9m+uv^}# z&It~AGF~%{eruc*VDY9ycVYAb?#cbWOUnB_*~C8|OJT8Cu@@h7DD!Q1h`r^!Xo-{p z+7@ubU}bOC>{1Ri9UxABjaT=eS-zIqG~$zTa^}gFeClLA51D^wA9=d<__S1B!h=sp z>Bw(GOA=<} z;bM8)T`QGO=HG~XuP%(0!fqTPwjRUXDX9D4@Lv!r2grFjc;=sGiRuWvV#QkdQyExA zJhTk8a`vy-Mx2<1`pH=1OdY~S%?W%apKYa{xV@cUK6uu#kUxuN V95Mbxyy*Y{002ovPDHLkV1gf~fUy7o literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/ValuePortUnconnected.png b/Editor/Nodes/Fundamentals/Resources/ValuePortUnconnected.png new file mode 100644 index 0000000000000000000000000000000000000000..6cb8afde96931a91b8a78d4a92dcdcb73bb67ab4 GIT binary patch literal 1061 zcmV+=1ls$FP)PiF4v>ykJX@lHOR_b)-iki`EYz<=t&keQn2SvGNDA5#;=t>G2+3lR$EfNw7bzE@A zdH3Y|KF{%o8>89t`r~uYJ>Td1`Tl;y_}f4&aeIL_c!#|=y~9$X$Lz`RnByvaH$k^P zXoci;39G?kkuo7WC|bbSL7#!IpYq_UtFQ>V+su0)+;nL>7{d8=5ST8a7u^pe7mdRT6GgAgX&epTa}=jZh44F+3ceqx4lc}#d;IZ~(sDECuI3Z`yg(uW%afEwNIN4Lm%{QC9%@}`0A8d*XzNFBUu%nnJE1I6)c z(yJWB(f`{3ZRAoX>KP^2#=C@4xTDfxNqhk}_Hv6xcW^X*bZ-Nunu^$SEy~*a{)u{` zyUEZ>Nl|Cjm%&pl@tj}jCL;_k+u}g5pum+&e3lK#fFiNa`qE3I4)~DToc} z$#jrE^k+l(bm>J<&mFIXIcLY>p`e)-K>kwRPRRlC!Y>AWJ6u>3_zFC2W$B=1bNy-t fuaV%)SiXM&uM1KFCssqu00000NkvXXu0mjfhOzsR literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/RedNodeSelected@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/ValuePortUnconnected.png.meta similarity index 80% rename from Editor/Nodes/Fundamentals/Resources/RedNodeSelected@Pro.png.meta rename to Editor/Nodes/Fundamentals/Resources/ValuePortUnconnected.png.meta index 52f4f207..50ca699f 100644 --- a/Editor/Nodes/Fundamentals/Resources/RedNodeSelected@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/ValuePortUnconnected.png.meta @@ -1,10 +1,10 @@ fileFormatVersion: 2 -guid: 2b47272953feac74b846e969c2a08e7f +guid: 6f562f1faede4e34e9debb33a898c14c TextureImporter: internalIDToNameTable: - first: - 213: 6058224919682867474 - second: NodeRedbackgroundFocused_0 + 213: -2554239901492636595 + second: ValuePortUnconnected_0 externalObjects: {} serializedVersion: 13 mipmaps: @@ -37,7 +37,7 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: 0 + filterMode: 1 aniso: 1 mipBias: 0 wrapU: 1 @@ -57,7 +57,7 @@ TextureImporter: alphaUsage: 1 alphaIsTransparency: 1 spriteTessellationDetail: -1 - textureType: 2 + textureType: 8 textureShape: 1 singleChannelComponent: 0 flipbookRows: 1 @@ -75,19 +75,6 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 4 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 textureCompression: 1 compressionQuality: 50 crunchedCompression: 0 @@ -97,7 +84,7 @@ TextureImporter: androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 4 - buildTarget: Android + buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -113,13 +100,13 @@ TextureImporter: serializedVersion: 2 sprites: - serializedVersion: 2 - name: NodeRedbackgroundFocused_0 + name: ValuePortUnconnected_0 rect: serializedVersion: 2 x: 0 y: 0 - width: 64 - height: 64 + width: 16 + height: 16 alignment: 0 pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} @@ -128,8 +115,8 @@ TextureImporter: physicsShape: [] tessellationDetail: -1 bones: [] - spriteID: 211ed137773231450800000000000000 - internalID: 6058224919682867474 + spriteID: d441760b7548d8cd0800000000000000 + internalID: -2554239901492636595 vertices: [] indices: edges: [] @@ -148,7 +135,7 @@ TextureImporter: spriteCustomMetadata: entries: [] nameFileIdTable: - NodeRedbackgroundFocused_0: 6058224919682867474 + ValuePortUnconnected_0: -2554239901492636595 mipmapLimitGroupName: pSDRemoveMatte: 0 userData: diff --git a/Editor/Nodes/Fundamentals/Resources/ValuePortUnconnected.png~ b/Editor/Nodes/Fundamentals/Resources/ValuePortUnconnected.png~ new file mode 100644 index 0000000000000000000000000000000000000000..1ca7f9a3a363c41c0aeb85cbe03928ade9566ff6 GIT binary patch literal 856 zcmV-e1E>6nP))=9ep!nzUKIyr|@Jb zsrxNH&i(tockeytDU_xei_KvV_!&i;Fl}-Y9F2mrvcL`pI2Hr@d{xzqFT;rSHf6CH z7p-!N*#SZ22Vx@t;mk(FstPWc0UvA!Z?6Zt&Vq-&frA&o1AD=_xiB={3nTh2^b;u% zw)G>-2twH2g?Mfb+x?z9tUe0xf!l46lJ_9Kz~yPI6E6gUY$dn>=pw= z5O%vUpzBo52%n~hjCJi~FmB$cu34cGZ zp5nj5aJeurKM(HjAcawKifjz8x9TKgd@P-?r9UI^fKgOP(~ObN_<+Y1m{<7}2J~$< zbQlKM=cDzE-ECNKtz(tKrjPlma>mzD?9<+cfy2FEO~Z*B@5O+5*ELUQl93$7QMa`G z=jU^L2QwTAoPD z2DCk?|=r@R4yP zh*C;1VO=;XywF*}XmY14rZ6J^jxjm<##-o&--e#E&+;#@ZH9A))O52xblt^?94#Z2 zkx&t*N^y)48$+C52;;5|5D1A-StVkR2Wh#SWlIJyflCrMx(_4j3G|w^zPK21X(_nm zI(V)8E#IC&{3sV3uEQ5o4^C)mzo}z#Is;CbAcezLhS+Vu*iWfwIXUPzuW)u2f~x%O iX5?xOO|Iyk)xd8V-EjE2hnb)N0000CGo&INj-_7I^JKLxyJpC3s1uP*DsSA-gnIHV0=?+8_V-ScB8Oi!`}7FyBYT> zmnpGr`2MxT@Id(yh@tf)nA*iCE&o`}i*Y;adP|=ZOaH27M~K(jS^ZwKc(eP~2H~lj zuhe$T|IfZ*&eVA;8;-wcdbKopOR=qg>E!>i&zRawivtI literal 2065 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|Rq- zW=KRygs+cPa(=E}VoH8es$NBI0Z=sqgN=PfL1J=tYKcNpYIG?W zUP)qwZeFo6&;%|8uo*6?#mPmP1tppJc?uvi6O-~wOKjEExfGyAJC>9bWhTK*&nwnT z1dEh{wCDjnt)G}utZ%4i0CJXsf(=Bym19aVhzqeKIJFSWf$(xN!8R2n78R$4R2HP# zst2VO=a&{Gr-DrYX@VN!T$GwvlA2;?WME{fYiOuzU}>X|CIzwsp~1DH#52Xt#LUnn z%{b9QHz_&ASl1*e)m%5x(mYAmAUWB<+&CpQIVIHsZV*HZsxfX!KvPVOOpVM;Ee%Z! z%`HtW4B#5TlBnuK@=KF5Kwhykf-6Iafz{gRgF-ha6A~z34m4EYIv_y?QHT^R#79+1 zGCZ0JN{e#9NgyRzKQ$*cH#M&W6iJ5ANJ>ezD#EaktG3V{<*qq>0iR1FoYVwV}Cn63t8M)3dp6PgkDNZ9%{8&pzTmnbu z!G7uYJuAek9#$1vTHedk&;WS>25=-$Y?L*Q=T=VN@_*O@D#5FL)C?I?*E?o zqUhI#<2TjkbVY~hM{S()^t+tp`3V6bqV-?rpP4OmXwAijde(kf34U2NkCr|g-%Zm) zB|gfUvg-q-trpZWXk z|5G%5fxK4Nu1EeM-C;Zbf6}pSx>B%mdvMC4ts1Kp_O55W^vgMO(*FCOSH1|;ySw>Q zw(WseO%pbsl-&C$?L)>qA45T_KV~`-Tbu4o>T!N29aww#ext&6CawBr^tu9MK|a%{P}+QQR$Kf z->G{Jw2CsU50N2UD+`JhrSJA6Hzw;lYwdY2%jK!& z%f#`?2Aa48b`!^<=ZPJeQ?0dR< zF0*&EN83D`oe4Smu4(^e z>aKm+wNF>|ghqkKI?rQ{6RoVA*9QK3x-av*cky)X`+-yHw$GTH<^Q_6DgN(_m4&-S z820dN`UDhk_vQLzx3`oXVOwtJE-?L|o&3u7`!(u(p22UXE_a$((xvx$KlN-p`>%b!Yyr!Iv=1*H3rD@) zZTw4*{jSah*~y~b_wHLPJ6vrov~b&Wrg!~j=U!NQZ$5S2jFb7&F}WY?i&VC0+_`kp QkpT!iUHx3vIVCg!0Mz#)p8x;= diff --git a/Editor/Nodes/Fundamentals/Resources/YellowNode.png~ b/Editor/Nodes/Fundamentals/Resources/YellowNode.png~ new file mode 100644 index 0000000000000000000000000000000000000000..a12174eaae686472f7ec0ecf6b5a5dd5ef846f06 GIT binary patch literal 2065 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|Rq- zW=KRygs+cPa(=E}VoH8es$NBI0Z=sqgN=PfL1J=tYKcNpYIG?W zUP)qwZeFo6&;%|8uo*6?#mPmP1tppJc?uvi6O-~wOKjEExfGyAJC>9bWhTK*&nwnT z1dEh{wCDjnt)G}utZ%4i0CJXsf(=Bym19aVhzqeKIJFSWf$(xN!8R2n78R$4R2HP# zst2VO=a&{Gr-DrYX@VN!T$GwvlA2;?WME{fYiOuzU}>X|CIzwsp~1DH#52Xt#LUnn z%{b9QHz_&ASl1*e)m%5x(mYAmAUWB<+&CpQIVIHsZV*HZsxfX!KvPVOOpVM;Ee%Z! z%`HtW4B#5TlBnuK@=KF5Kwhykf-6Iafz{gRgF-ha6A~z34m4EYIv_y?QHT^R#79+1 zGCZ0JN{e#9NgyRzKQ$*cH#M&W6iJ5ANJ>ezD#EaktG3V{<*qq>0iR1FoYVwV}Cn63t8M)3dp6PgkDNZ9%{8&pzTmnbu z!G7uYJuAek9#$1vTHedk&;WS>25=-$Y?L*Q=T=VN@_*O@D#5FL)C?I?*E?o zqUhI#<2TjkbVY~hM{S()^t+tp`3V6bqV-?rpP4OmXwAijde(kf34U2NkCr|g-%Zm) zB|gfUvg-q-trpZWXk z|5G%5fxK4Nu1EeM-C;Zbf6}pSx>B%mdvMC4ts1Kp_O55W^vgMO(*FCOSH1|;ySw>Q zw(WseO%pbsl-&C$?L)>qA45T_KV~`-Tbu4o>T!N29aww#ext&6CawBr^tu9MK|a%{P}+QQR$Kf z->G{Jw2CsU50N2UD+`JhrSJA6Hzw;lYwdY2%jK!& z%f#`?2Aa48b`!^<=ZPJeQ?0dR< zF0*&EN83D`oe4Smu4(^e z>aKm+wNF>|ghqkKI?rQ{6RoVA*9QK3x-av*cky)X`+-yHw$GTH<^Q_6DgN(_m4&-S z820dN`UDhk_vQLzx3`oXVOwtJE-?L|o&3u7`!(u(p22UXE_a$((xvx$KlN-p`>%b!Yyr!Iv=1*H3rD@) zZTw4*{jSah*~y~b_wHLPJ6vrov~b&Wrg!~j=U!NQZ$5S2jFb7&F}WY?i&VC0+_`kp QkpT!iUHx3vIVCg!0Mz#)p8x;= literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/YellowNode@Pro.png b/Editor/Nodes/Fundamentals/Resources/YellowNode@Pro.png index 06bb0d5c6d7b916443c31104faacf4b67f2d2c71..b9232df303c0fb985974c95fcbfbd0fcb435c625 100644 GIT binary patch delta 390 zcmdliu$6g&MLlD>r;B4qMcmujwqDGE3@w|vn!Xz(X=kLq)LgUJbNb;Ms)AcTi8Zks zMEox1SCn|P=S6e7!sU8vZf~>Mnfqq)2kp(f5VLyv-`0I`+ukRfkAJlDzV*L7t72j+ z1%Ax5%PW;X)bRgs<#m2>t)xiqip$-Jp7Z_vFUZ=&*@y4r7d5DVv*n*p{;}GI^-p{` z&6hU#&VTTK%7%N6zu!G9`yF>cfwjW>MyJGqd)F@?WwbSJCw-~9)`QGwhrJ~|W$T_#%=@(eaLj|rr~dG+ePpe&{L-aO3_#%N>gTe~DWM4f D@p`;+ literal 2099 zcmb7FX;c&E8Xguwq69apY!aoK)52szAV5MA*<`suKvt<#44DA}A%tWi0ZNM~#cBZ&xw44fNuXHo>5qHQoSApt_j{h_n|Jxn z!Q9_>tW9tUh+fC7zn*1!~lSARo_~L)_5}j&->_zwb z`_Z{ci6jo36pfIii9!qw0E}HyA%~lQpoC~7mM35mC$BdX2|Sod45#{&{e|vG9M3yV zgaoItL%3-PTpCQ=#lkV9bW9)-K{*6zB3~e;OPNHCE**PUhan;c62UR_AP>)F2<9<~ zaVRRJLr_Xe3Ms{olq8CUY-uzaM5aI#3Wy;CrMByk%%KKOS__|h!?%0E)bJAnutVAAz?{F99Rt5lE~`MA`lo$c)BYrR=Z1^ z1S82BXUXI9G&>17A~6z@DnyvXAVi!b5pfZXf||4};x0lsC<3!6WC|6uwFSve4Cud> z)O)-o?3SWFFw5R4hHJ--aR6ylDjBr5N9@38Dg^=U$W)pwLgCOHsN5ByCCa-pp3#^J zl|rRBU<7+xM;g_Myh6|{zKah@l5peHsjw(3u(vS{mI0}&%jYc>MdK`2WreX+vL)bO z+Va1*3g)h~NhlHVH6s9XA%u@4A_7$1B-`aC!CX4ZL;1+t7P<1#cUy$b9-Yq-#4?Fe z5JqA+50lYdf;?GLPWp_(O(zB}&oyy*KV8(oJyvDDM3D!Yu3jDq{Ju z&fgyzz3DzjODr3E$&ybGz1sFO!F@r$W_)PjJ)N>k?gzqe8!GnoUfZ}(n7=u#plGU4 z92RGMrKv;xF_#SX9p13DMv}NCanFz5~S2iS#HpD zbNN=;vr^}p;Bwvl^M5o7I?T=6+UUMb!*31+KIs;A1X-qMa2s4pCKep7;^Lz2T_XVY z_8aU{EvO{cn&XYM{?|78LX|8yr^;GCGeT=x>qRT@rP11NcWpFliClFSAONcY?acqz zv>-+yz&bz|&~o|H%$5U@Q7j@2y3Sk`8P=;!r`>AVrmtrfSu$wWO!1q@y{$i8 zFLi5%X_b@#9PA!?D$|CD%9`}30C^A(5jf7JO>ae2!9+kU-UDrqk! zk18$}#gH#|GJ=L=k1pv1SR5x#d{k2V{iwpOo88!10Dq{uy2HA(QJKHHY>Vy_6I1ik zg3!&K)^asp>YUKVQ!z2Cd2 zp8A{HnvSDIY}E~w@2xY;gU!xq4Zg*>c&DlUjDI+0#vW1x1DOQ}`{!5&vW%}8F0$LS z*pchM4_TCKHv5*+urF}aOS3M-tiGRe%xdO?_3izo^RIIjpO1BgSASUEG?LXKkQ)NG zwF2lT+nsk@NKO8!=6F<}qS5WtsJ86q6aTJ4+QKbnuCGV8cTK)HQ2AWfq6{;quU{JC@0jon&`@w@X6-Nqk#eGpKN`ymttD~UTha}~_wz#7wpJ&uyz u>bhTrUb00wyH8nP`3qteA4C|I4<>Pdy*{;hZ!Fcnb)VgAk2<#lS^oicAVz%v diff --git a/Editor/Nodes/Fundamentals/Resources/YellowNode@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/YellowNode@Pro.png.meta index f880c125..db4b9271 100644 --- a/Editor/Nodes/Fundamentals/Resources/YellowNode@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/YellowNode@Pro.png.meta @@ -24,7 +24,7 @@ TextureImporter: heightScale: 0.25 normalMapFilter: 0 flipGreenChannel: 0 - isReadable: 0 + isReadable: 1 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 diff --git a/Editor/Nodes/Fundamentals/Resources/YellowNode@Pro.png~ b/Editor/Nodes/Fundamentals/Resources/YellowNode@Pro.png~ new file mode 100644 index 0000000000000000000000000000000000000000..488eebe5ef8152229a9e34f984d3ad237b17e2c0 GIT binary patch literal 1030 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|WC8 zPZ!6KinzD4y)%RzC64c(d-JT?O_NUF;Ma@8jz+v*obg)vtBRB85~q&~lzZS@G%lV`|+hnP8 z`pp0T|7+v;I2O&%2%s}0)ih$21GcRt>jvJ=Id>_?OqSBPpbR>P?h@XP&>KE%;;2%=<6fLPQ_lnav2CfL@wAfp&TAg5ZKH&sFM@>0J>i|+=LuD;{n@-1`j^-Fg|`cD{Z2WTX) ze~p{+_Zq)N;$e01Y(^G0(HWK}UN3X_zop8q0^)^Od z>L_?&U$m}$bFs9VaKqWFU;C$h4B?mt)5 z%#{yM@e^8h?B3b;5eh#dCLfoyn0Mr3@b6Xm|YE8z8Y7Au3Ln|@#T`B$++WTrU_261M|i*-;Mw?USnX!X7F_Nb6Mw<&;$T+0nsr4 literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/action.png.meta b/Editor/Nodes/Fundamentals/Resources/action.png.meta index 669b37b0..ebbc4291 100644 --- a/Editor/Nodes/Fundamentals/Resources/action.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/action.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 66a9a41964d966e4c86d233bd6f8d89b TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -2443122451703809864 + second: action_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -32,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -51,17 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -71,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -83,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: WebGL maxTextureSize: 32 resizeAlgorithm: 0 @@ -95,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: action_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 8b8b96b0319481ed0800000000000000 + internalID: -2443122451703809864 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -110,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/action_bind.png.meta b/Editor/Nodes/Fundamentals/Resources/action_bind.png.meta index 632efdec..319eeaee 100644 --- a/Editor/Nodes/Fundamentals/Resources/action_bind.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/action_bind.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 4402956b7feb740498fa22721b9aa9aa TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -7450676809828138797 + second: action_bind_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -51,7 +56,9 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 @@ -62,8 +69,10 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -73,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -85,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: action_bind_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 3d004f5bae0e99890800000000000000 + internalID: -7450676809828138797 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -100,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/action_invoke.png.meta b/Editor/Nodes/Fundamentals/Resources/action_invoke.png.meta index a6de17c2..39a5217b 100644 --- a/Editor/Nodes/Fundamentals/Resources/action_invoke.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/action_invoke.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 47b3e114f09cd564bb4f4ab043d4ec18 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -4936398509209094756 + second: action_invoke_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -32,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -51,17 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -71,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -83,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: WebGL maxTextureSize: 32 resizeAlgorithm: 0 @@ -95,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: action_invoke_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c95f2d4c5b36e7bb0800000000000000 + internalID: -4936398509209094756 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -110,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/action_unbind.png.meta b/Editor/Nodes/Fundamentals/Resources/action_unbind.png.meta index 2b8b1a2c..b08dd98c 100644 --- a/Editor/Nodes/Fundamentals/Resources/action_unbind.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/action_unbind.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 6ddeecdeeb651364497e8ada2bafbce2 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -8780413589175645765 + second: action_unbind_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -51,7 +56,9 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 @@ -62,8 +69,10 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -73,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -85,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: action_unbind_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: bb94c2c7c54b52680800000000000000 + internalID: -8780413589175645765 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -100,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/arrow_switch.png.meta b/Editor/Nodes/Fundamentals/Resources/arrow_switch.png.meta index e1866ec9..67ea40a9 100644 --- a/Editor/Nodes/Fundamentals/Resources/arrow_switch.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/arrow_switch.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 699544638e3fdf34a934cbc62071ce9e TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -8746015916261445969 + second: arrow_switch_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: arrow_switch_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: faee25fccd8ef9680800000000000000 + internalID: -8746015916261445969 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/arrow_switch@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/arrow_switch@Pro.png.meta index 4b132139..cd14b352 100644 --- a/Editor/Nodes/Fundamentals/Resources/arrow_switch@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/arrow_switch@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 8d037404751bfe94089d1cc02cbde389 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 8630225166393941869 + second: arrow_switch@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: arrow_switch@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: d6f1c8e5018b4c770800000000000000 + internalID: 8630225166393941869 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/comments.png.meta b/Editor/Nodes/Fundamentals/Resources/comments.png.meta index aa946c7a..43878d6d 100644 --- a/Editor/Nodes/Fundamentals/Resources/comments.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/comments.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: ccc59113899d16144abfff00c8c6ac00 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 1162305688406262261 + second: comments_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: comments_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 5f10fdd8dd6512010800000000000000 + internalID: 1162305688406262261 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/comments@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/comments@Pro.png.meta index 9728c5bb..998a11b2 100644 --- a/Editor/Nodes/Fundamentals/Resources/comments@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/comments@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: d1269308f936ea04880c12c71a396a69 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -626643602076209070 + second: comments@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: comments@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 250f979c6f6bd47f0800000000000000 + internalID: -626643602076209070 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/compiler.png.meta b/Editor/Nodes/Fundamentals/Resources/compiler.png.meta index f3469f57..73395ff6 100644 --- a/Editor/Nodes/Fundamentals/Resources/compiler.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/compiler.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 89cdddcd64212cd4ba9d1fb6e63456ac TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -7449348272413432575 + second: compiler_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -32,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -51,7 +56,9 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 @@ -62,8 +69,10 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -73,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -85,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: compiler_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 105a0aee6399e9890800000000000000 + internalID: -7449348272413432575 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -100,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/construction.png.meta b/Editor/Nodes/Fundamentals/Resources/construction.png.meta index bf6741c0..525983ef 100644 --- a/Editor/Nodes/Fundamentals/Resources/construction.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/construction.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: fd9ca61a4ce2a914b9b8d5ff01686054 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -2957230348993709125 + second: construction_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: construction_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: bbbb9396aaec5f6d0800000000000000 + internalID: -2957230348993709125 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/construction@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/construction@Pro.png.meta index 63d3ea75..08a4d529 100644 --- a/Editor/Nodes/Fundamentals/Resources/construction@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/construction@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 3bb43111e09e2ab48a392a5f963eb849 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -587603318458221593 + second: construction@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: construction@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 7ebf47625e968d7f0800000000000000 + internalID: -587603318458221593 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/construction_alarm.png.meta b/Editor/Nodes/Fundamentals/Resources/construction_alarm.png.meta index b5106116..d69b7c84 100644 --- a/Editor/Nodes/Fundamentals/Resources/construction_alarm.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/construction_alarm.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 1077aedace5382343b967adae1f9b61f TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -5821053049004359113 + second: construction_alarm_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: construction_alarm_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 732046bd717773fa0800000000000000 + internalID: -5821053049004359113 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/construction_alarm@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/construction_alarm@Pro.png.meta index 21e504bc..e29fdf93 100644 --- a/Editor/Nodes/Fundamentals/Resources/construction_alarm@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/construction_alarm@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: ebf777a7ff3ae5b4eb37b32930604801 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -2534544111285469864 + second: construction_alarm@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: construction_alarm@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 85d75433f8d73dcd0800000000000000 + internalID: -2534544111285469864 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/csharp_object.png.meta b/Editor/Nodes/Fundamentals/Resources/csharp_object.png.meta index 70ba59ed..b87f8b60 100644 --- a/Editor/Nodes/Fundamentals/Resources/csharp_object.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/csharp_object.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 452cccb926e9cac45be403f222640aa7 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 5703247039503450630 + second: csharp_object_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -51,7 +56,9 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 @@ -62,8 +69,10 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -73,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -85,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: csharp_object_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 602c6ef17f0062f40800000000000000 + internalID: 5703247039503450630 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -100,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/debug.png.meta b/Editor/Nodes/Fundamentals/Resources/debug.png.meta index 316fb67e..f7e96400 100644 --- a/Editor/Nodes/Fundamentals/Resources/debug.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/debug.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 5f7761fb336a5b34c89e0efe5e4a2284 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 2211457692393877659 + second: debug_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: debug_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: b9031feed0da0be10800000000000000 + internalID: 2211457692393877659 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/debug@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/debug@Pro.png.meta index 25ec31cd..e635d56b 100644 --- a/Editor/Nodes/Fundamentals/Resources/debug@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/debug@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 9c573ad1cf8d5ec4bb7a520d7406a574 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 831943065769279002 + second: debug@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: debug@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a1ef68c7fc7ab8b00800000000000000 + internalID: 831943065769279002 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/enum.png.meta b/Editor/Nodes/Fundamentals/Resources/enum.png.meta index 93b06eb9..51f7441a 100644 --- a/Editor/Nodes/Fundamentals/Resources/enum.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/enum.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: f01daac08118ed04db30d5d5ab125af9 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -8579170797328981003 + second: enum_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -51,7 +56,9 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 @@ -62,8 +69,10 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -73,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -85,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: enum_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 5f32dcd3d99a0f880800000000000000 + internalID: -8579170797328981003 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -100,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/flow_reroute.png.meta b/Editor/Nodes/Fundamentals/Resources/flow_reroute.png.meta index 86c6caca..2b5781a5 100644 --- a/Editor/Nodes/Fundamentals/Resources/flow_reroute.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/flow_reroute.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: bfa5f2b45d8df8b4dbf19e8214e2b495 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -7016918166877906877 + second: flow_reroute_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: flow_reroute_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 348d14dba16ee9e90800000000000000 + internalID: -7016918166877906877 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/flow_reroute@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/flow_reroute@Pro.png.meta index 5c3b5d4d..99775568 100644 --- a/Editor/Nodes/Fundamentals/Resources/flow_reroute@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/flow_reroute@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 5921e2c74b20e544da0d07a49c203e71 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -5866422022505269018 + second: flow_reroute@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: flow_reroute@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 6e87b0e8048469ea0800000000000000 + internalID: -5866422022505269018 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/func.png.meta b/Editor/Nodes/Fundamentals/Resources/func.png.meta index 1d9ea5cf..4f0fb330 100644 --- a/Editor/Nodes/Fundamentals/Resources/func.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/func.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 8cb4543fe6d2b5d44a6ecf76b0c7f181 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -7558745195644824016 + second: func_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -32,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -51,17 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -71,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -83,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: WebGL maxTextureSize: 32 resizeAlgorithm: 0 @@ -95,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: func_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 03656e1ea41f91790800000000000000 + internalID: -7558745195644824016 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -110,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/func@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/func@Pro.png.meta index 9478b948..c6dcb0fd 100644 --- a/Editor/Nodes/Fundamentals/Resources/func@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/func@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 945f87ac4eeb289439c1c65452aebe63 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 6962744358758230732 + second: func@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -32,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -51,17 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -71,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -83,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: WebGL maxTextureSize: 32 resizeAlgorithm: 0 @@ -95,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: func@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ccaa3a5aa13a0a060800000000000000 + internalID: 6962744358758230732 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -110,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/func_bind.png.meta b/Editor/Nodes/Fundamentals/Resources/func_bind.png.meta index 9d59d445..437a4e0b 100644 --- a/Editor/Nodes/Fundamentals/Resources/func_bind.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/func_bind.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 9494ba4e21e52ec4b87cb787216ce376 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 4089846634649229342 + second: func_bind_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -51,7 +56,9 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 @@ -62,8 +69,10 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -73,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -85,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: func_bind_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e18181468dd02c830800000000000000 + internalID: 4089846634649229342 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -100,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/func_invoke.png.meta b/Editor/Nodes/Fundamentals/Resources/func_invoke.png.meta index 6a0b7967..0827405b 100644 --- a/Editor/Nodes/Fundamentals/Resources/func_invoke.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/func_invoke.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: af49d631d6f7c6f47befbd392ce8c29f TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 7693846368099355999 + second: func_invoke_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -32,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -51,17 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -71,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -83,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: WebGL maxTextureSize: 32 resizeAlgorithm: 0 @@ -95,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: func_invoke_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: f5dcdfe028806ca60800000000000000 + internalID: 7693846368099355999 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -110,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/func_invoke@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/func_invoke@Pro.png.meta index 1c47659f..18faa3ee 100644 --- a/Editor/Nodes/Fundamentals/Resources/func_invoke@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/func_invoke@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: d157b3ab92da9e34193a97c7178fd76b TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -2546925135384322829 + second: func_invoke@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -32,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -51,17 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -71,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -83,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: WebGL maxTextureSize: 32 resizeAlgorithm: 0 @@ -95,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: func_invoke@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 3fc57e3651187acd0800000000000000 + internalID: -2546925135384322829 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -110,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/func_unbind.png.meta b/Editor/Nodes/Fundamentals/Resources/func_unbind.png.meta index 985ea639..b2ff26c5 100644 --- a/Editor/Nodes/Fundamentals/Resources/func_unbind.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/func_unbind.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: a7d5048e0868c824fa9b1c288a266244 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 3626174985738485996 + second: func_unbind_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,10 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -51,7 +56,9 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 @@ -62,8 +69,10 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -73,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -85,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: func_unbind_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ce0895eefe2c25230800000000000000 + internalID: 3626174985738485996 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -100,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/maximize_window.png b/Editor/Nodes/Fundamentals/Resources/maximize_window.png new file mode 100644 index 0000000000000000000000000000000000000000..b5882d1ee259713cea46af53f6365693cd42efba GIT binary patch literal 246 zcmeAS@N?(olHy`uVBq!ia0vp^0w65F1|U zaSZYBPF}N?`QZQmk{v9m?G6(r3buc`qh~Gf$G+3!vBZpyP>&^6;YwEzPTja5Tj7DT z)3e`>Umu6C^D0(!BwH{noBW-DLugZf$54>gg zns|g4vK@EKbc}k+w4ydx;hVv>%?_Va<<6wHd@@|B$govkI?L}{!}F#6IuxX literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/OrangeNodeSelected@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/maximize_window.png.meta similarity index 57% rename from Editor/Nodes/Fundamentals/Resources/OrangeNodeSelected@Pro.png.meta rename to Editor/Nodes/Fundamentals/Resources/maximize_window.png.meta index 91faff7c..180fed81 100644 --- a/Editor/Nodes/Fundamentals/Resources/OrangeNodeSelected@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/maximize_window.png.meta @@ -1,10 +1,19 @@ fileFormatVersion: 2 -guid: cf4ac7c8e5d9bdb47a0c1c5cb314d962 +guid: 8805de16189fb0e4b8346f50bca7c529 TextureImporter: internalIDToNameTable: - first: - 213: -2916287662509644985 - second: NodeOrangebackgroundFocused_0 + 213: 483651635342203646 + second: maximize_window_0 + - first: + 213: 7101006333619695446 + second: maximize_window_1 + - first: + 213: 4153977732051321093 + second: maximize_window_2 + - first: + 213: -4090038546554417309 + second: maximize_window_3 externalObjects: {} serializedVersion: 13 mipmaps: @@ -37,7 +46,7 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: 0 + filterMode: 1 aniso: 1 mipBias: 0 wrapU: 1 @@ -57,7 +66,7 @@ TextureImporter: alphaUsage: 1 alphaIsTransparency: 1 spriteTessellationDetail: -1 - textureType: 2 + textureType: 8 textureShape: 1 singleChannelComponent: 0 flipbookRows: 1 @@ -75,19 +84,6 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 4 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 textureCompression: 1 compressionQuality: 50 crunchedCompression: 0 @@ -97,7 +93,7 @@ TextureImporter: androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 4 - buildTarget: Android + buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -113,13 +109,79 @@ TextureImporter: serializedVersion: 2 sprites: - serializedVersion: 2 - name: NodeOrangebackgroundFocused_0 + name: maximize_window_0 rect: serializedVersion: 2 x: 0 + y: 9 + width: 7 + height: 7 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: efadb9f899646b600800000000000000 + internalID: 483651635342203646 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: maximize_window_1 + rect: + serializedVersion: 2 + x: 8 + y: 9 + width: 8 + height: 7 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 65f633f33a7db8260800000000000000 + internalID: 7101006333619695446 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: maximize_window_2 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 7 + height: 8 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 5014dc31db4e5a930800000000000000 + internalID: 4153977732051321093 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: maximize_window_3 + rect: + serializedVersion: 2 + x: 8 y: 0 - width: 64 - height: 64 + width: 8 + height: 8 alignment: 0 pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} @@ -128,8 +190,8 @@ TextureImporter: physicsShape: [] tessellationDetail: -1 bones: [] - spriteID: 743224572d34787d0800000000000000 - internalID: -2916287662509644985 + spriteID: 36f08f2ac934d37c0800000000000000 + internalID: -4090038546554417309 vertices: [] indices: edges: [] @@ -148,7 +210,10 @@ TextureImporter: spriteCustomMetadata: entries: [] nameFileIdTable: - NodeOrangebackgroundFocused_0: -2916287662509644985 + maximize_window_0: 483651635342203646 + maximize_window_1: 7101006333619695446 + maximize_window_2: 4153977732051321093 + maximize_window_3: -4090038546554417309 mipmapLimitGroupName: pSDRemoveMatte: 0 userData: diff --git a/Editor/Nodes/Fundamentals/Resources/maximize_window.png~ b/Editor/Nodes/Fundamentals/Resources/maximize_window.png~ new file mode 100644 index 0000000000000000000000000000000000000000..c1a2b5154b63b799bfea3a0110a3ea848683214d GIT binary patch literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^0w65F1|$MXMwx`GhL>IMa6Wxl67^WQf-`0wc=b^L(K8YiWzJB3#At?OZpWoDEY zGP=*dN`ARj2FF2XnZt|*b2sf#@Hk<2>8WC1-v#%#8VWaEncp!?inUqQcuVoXj~~Vy zMm{Z4GVDuPGpBMd_~zSqYTo)`XW_ pDt-U6glC7XkY)Am+$yn*kKs3qrzi8gQjiB3JYD@<);T3K0RTKnR$Tx9 literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/maximize_window@Pro.png b/Editor/Nodes/Fundamentals/Resources/maximize_window@Pro.png new file mode 100644 index 0000000000000000000000000000000000000000..f11acc5ebeaf5369bad0231adbf311cb9a7c495b GIT binary patch literal 243 zcmeAS@N?(olHy`uVBq!ia0vp^0w65F1|hwg6*H~yl;2>@Lxr#H#tEmOmX6?n9dOP@M9fvOe{4X ztA0wnTByjvUnmx%_DPPxvFq(&1BOS5Ee2Z`H>8O3?_l;Q`?!KFtDWI-I=ev13=UHZ zJ}>S|TH+3GXESYV-#C{sjPF3k3Z|@TkvzFwwaoLl-DDdA#Ra-*{*>^@P#XXM literal 0 HcmV?d00001 diff --git a/Editor/Nodes/Fundamentals/Resources/maximize_window@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/maximize_window@Pro.png.meta new file mode 100644 index 00000000..930391d1 --- /dev/null +++ b/Editor/Nodes/Fundamentals/Resources/maximize_window@Pro.png.meta @@ -0,0 +1,221 @@ +fileFormatVersion: 2 +guid: f088d90dc25b1a74a8c9cb497360816a +TextureImporter: + internalIDToNameTable: + - first: + 213: 522147507449358955 + second: maximize_window@Pro_0 + - first: + 213: 6437306139057194154 + second: maximize_window@Pro_1 + - first: + 213: 4073647287266456412 + second: maximize_window@Pro_2 + - first: + 213: -1757327065219563420 + second: maximize_window@Pro_3 + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: maximize_window@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 9 + width: 7 + height: 7 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: b6aefdd346a0f3700800000000000000 + internalID: 522147507449358955 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: maximize_window@Pro_1 + rect: + serializedVersion: 2 + x: 9 + y: 9 + width: 7 + height: 7 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: aa402f0c3d7e55950800000000000000 + internalID: 6437306139057194154 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: maximize_window@Pro_2 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 7 + height: 7 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c5330c9ef90888830800000000000000 + internalID: 4073647287266456412 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: maximize_window@Pro_3 + rect: + serializedVersion: 2 + x: 8 + y: 0 + width: 8 + height: 8 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 460886b4858bc97e0800000000000000 + internalID: -1757327065219563420 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: + maximize_window@Pro_0: 522147507449358955 + maximize_window@Pro_1: 6437306139057194154 + maximize_window@Pro_2: 4073647287266456412 + maximize_window@Pro_3: -1757327065219563420 + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/multi_array.png.meta b/Editor/Nodes/Fundamentals/Resources/multi_array.png.meta index c5f404fa..526551cf 100644 --- a/Editor/Nodes/Fundamentals/Resources/multi_array.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/multi_array.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 9f00e7c622dd4564396b0b8de4909fae TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -7576459816472948428 + second: multi_array_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: multi_array_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 431db1050f10bd690800000000000000 + internalID: -7576459816472948428 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/multi_array@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/multi_array@Pro.png.meta index a084a6fe..92a92821 100644 --- a/Editor/Nodes/Fundamentals/Resources/multi_array@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/multi_array@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: d3fb4a6b841b3cd46ae3d4a31400519a TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -274064474052485005 + second: multi_array@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: multi_array@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 3702c8a10d3523cf0800000000000000 + internalID: -274064474052485005 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/value_reroute.png.meta b/Editor/Nodes/Fundamentals/Resources/value_reroute.png.meta index 02a5df92..e845ae97 100644 --- a/Editor/Nodes/Fundamentals/Resources/value_reroute.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/value_reroute.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 2a25bc6b0361b4944a2ddbf88bfde9f3 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -6974927983582013048 + second: value_reroute_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: value_reroute_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 88999a424f3143f90800000000000000 + internalID: -6974927983582013048 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/value_reroute@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/value_reroute@Pro.png.meta index 3f99e578..370a56db 100644 --- a/Editor/Nodes/Fundamentals/Resources/value_reroute@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/value_reroute@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 3775222eebaadb346a068e93636abcd9 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -6476312399558390610 + second: value_reroute@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,12 +95,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: value_reroute@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: eac4dd18f248f16a0800000000000000 + internalID: -6476312399558390610 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -96,9 +134,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/variableevent.png.meta b/Editor/Nodes/Fundamentals/Resources/variableevent.png.meta index 2ad28a5c..8c7219c2 100644 --- a/Editor/Nodes/Fundamentals/Resources/variableevent.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/variableevent.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: d89bc54c16777624e9d0ab2139b4e46c TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 7598949062803533970 + second: variableevent_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: variableevent_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 29031b269e3e47960800000000000000 + internalID: 7598949062803533970 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/variableevent@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/variableevent@Pro.png.meta index 9b636f6c..e7bb855a 100644 --- a/Editor/Nodes/Fundamentals/Resources/variableevent@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/variableevent@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: ceca253ec9e02714eaa7e21489129647 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 7168171767424500122 + second: variableevent@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: variableevent@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a91425e6e367a7360800000000000000 + internalID: 7168171767424500122 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/weather_clouds.png.meta b/Editor/Nodes/Fundamentals/Resources/weather_clouds.png.meta index 3ac749e9..356e1eea 100644 --- a/Editor/Nodes/Fundamentals/Resources/weather_clouds.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/weather_clouds.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 1d88ff96bc2a36648a7e6203b71cf510 TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: 8688097949491428416 + second: weather_clouds_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: weather_clouds_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 04c7c35bd03529870800000000000000 + internalID: 8688097949491428416 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Resources/weather_clouds@Pro.png.meta b/Editor/Nodes/Fundamentals/Resources/weather_clouds@Pro.png.meta index d4b6dcee..30dfbab5 100644 --- a/Editor/Nodes/Fundamentals/Resources/weather_clouds@Pro.png.meta +++ b/Editor/Nodes/Fundamentals/Resources/weather_clouds@Pro.png.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: c82c8de1ca0582e4e9a7b0a64b48391c TextureImporter: - internalIDToNameTable: [] + internalIDToNameTable: + - first: + 213: -5802412334592017593 + second: weather_clouds@Pro_0 externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +23,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +37,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -50,16 +56,23 @@ TextureImporter: spriteGenerateFallbackPhysicsShape: 0 alphaUsage: 1 alphaIsTransparency: 1 + spriteTessellationMethod: 0 spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 @@ -69,9 +82,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 @@ -81,9 +95,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 32 resizeAlgorithm: 0 @@ -93,12 +108,36 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 - sprites: [] + sprites: + - serializedVersion: 2 + name: weather_clouds@Pro_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 32 + height: 32 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 74b3c4469b0b97fa0800000000000000 + internalID: -5802412334592017593 + vertices: [] + indices: + edges: [] + weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -108,9 +147,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Editor/Nodes/Fundamentals/Widgets/ArrowWidget.cs b/Editor/Nodes/Fundamentals/Widgets/ArrowWidget.cs index 4ec437f7..de47a12f 100644 --- a/Editor/Nodes/Fundamentals/Widgets/ArrowWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/ArrowWidget.cs @@ -21,18 +21,20 @@ public ArrowWidget(FlowCanvas canvas, Arrow unit) : base(canvas, unit) public override float zIndex { - get - { - return float.MaxValue; - } + get => float.MaxValue; set { } } - +#if NEW_UNIT_UI + protected override bool AllowRectSnapping => false; +#endif public override bool canClip => false; Vector3 lineStart; Vector3 lineEnd; + public override void DrawForeground() { + Color originalHandlesColor = Handles.color; + Vector3 unitCenter = new Vector3(position.x + position.width / 2f, position.y + position.height / 2f); Vector3 direction = Quaternion.Euler(0f, 0f, unit.rotationAngle) * Vector3.right; @@ -56,7 +58,6 @@ public override void DrawForeground() Vector3 arrowTipEnd = lineEnd + (lineEnd - lineStart).normalized * arrowHeight; if (unit.ShowTopArrow) DrawArrow(arrowTipStart, lineStart, unit.ArrowColor); - if (unit.ShowBottomArrow) DrawArrow(arrowTipEnd, lineEnd, unit.ArrowColor); if (unit.ShowCenter) @@ -66,7 +67,7 @@ public override void DrawForeground() DrawTextField((lineStart + lineEnd) / 2f, unit.Text); - Handles.color = Color.white; + Handles.color = originalHandlesColor; SendToBack(); } @@ -83,28 +84,25 @@ private void DrawArrow(Vector3 arrowTip, Vector3 arrowBase, Color arrowColor) arrowTip + arrowSide2 * arrowWidth }; + Color prev = Handles.color; Handles.color = arrowColor; Handles.DrawAAConvexPolygon(arrowPoints); + Handles.color = prev; } private void DrawUnitPosition(Vector3 unitCenter) { float halfSize = arrowHandle / 2f; - if (isMouseOver) - { - Handles.color = Color.black; - } - else - { - Handles.color = Color.white; - } + Color prev = Handles.color; + Handles.color = isMouseOver ? Color.black : Color.white; Handles.DrawAAConvexPolygon( unitCenter + new Vector3(-halfSize, -halfSize, 0f), unitCenter + new Vector3(-halfSize, halfSize, 0f), unitCenter + new Vector3(halfSize, halfSize, 0f), unitCenter + new Vector3(halfSize, -halfSize, 0f) ); + Handles.color = prev; } protected override IEnumerable contextOptions => base.contextOptions.Where(c => c.label != "Replace..."); @@ -177,7 +175,7 @@ public override void HandleInput() if (e.rawType == EventType.MouseDown && !canvas.isSelecting && over) { - if (e.mouseButton == 0) + if (e.mouseButton == MouseButton.Left) { Select(); GUI.changed = true; @@ -189,7 +187,7 @@ public override void HandleInput() e.Use(); } - if (e.clickCount == 2 && e.mouseButton == 0 && overLine) + if (e.clickCount == 2 && overLine) { Vector2 canvasCenter = canvas.pan + canvas.viewport.center; Vector3 furthestEnd = Vector2.Distance(lineStart, canvasCenter) > Vector2.Distance(lineEnd, canvasCenter) ? lineStart : lineEnd; @@ -334,40 +332,42 @@ private static float DistanceToLine(Vector2 point, Vector2 a, Vector2 b) return Vector2.Distance(point, closest); } - private void DrawTextField(Vector3 position, string text) + private void DrawTextField(Vector3 canvasPosition, string text) { - GUIStyle style = new GUIStyle(GUI.skin.label); - style.alignment = TextAnchor.MiddleCenter; + if (string.IsNullOrEmpty(text)) return; - Vector2 screenPos = HandleUtility.WorldToGUIPoint(position); + GUIStyle style = new GUIStyle(GUI.skin.label) + { + alignment = TextAnchor.MiddleCenter + }; GUIContent content = new GUIContent(text); Vector2 textSize = style.CalcSize(content); - Rect labelRect = new Rect(screenPos.x - textSize.x / 2f, screenPos.y - textSize.y / 2f, textSize.x, textSize.y); + Rect labelRect = new Rect(canvasPosition.x - textSize.x / 2f, canvasPosition.y - textSize.y / 2f, textSize.x, textSize.y); - Handles.BeginGUI(); + Color originalColor = GUI.contentColor; + GUI.contentColor = Color.white; GUI.Label(labelRect, content, style); - Handles.EndGUI(); + GUI.contentColor = originalColor; } private void DrawDottedLine(Vector3 start, Vector3 end, float segmentLength, float gapLength = 5f) { Vector3 direction = (end - start).normalized; - Vector3 currentPosition = start; while (Vector3.Distance(currentPosition, end) > segmentLength) { Vector3 segmentEnd = currentPosition + direction * segmentLength; - Handles.DrawAAPolyLine(currentPosition, segmentEnd); + Handles.DrawAAPolyLine(lineWidth, currentPosition, segmentEnd); currentPosition = segmentEnd + direction * gapLength; } if (Vector3.Distance(currentPosition, end) > 0f) { - Handles.DrawAAPolyLine(currentPosition, end); + Handles.DrawAAPolyLine(lineWidth, currentPosition, end); } } } -} +} \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Widgets/CommentNodeWidget.cs b/Editor/Nodes/Fundamentals/Widgets/CommentNodeWidget.cs index 949a8950..87b9bb86 100644 --- a/Editor/Nodes/Fundamentals/Widgets/CommentNodeWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/CommentNodeWidget.cs @@ -27,10 +27,7 @@ public sealed class CommentNodeWidget : UnitWidget public override float zIndex { - get - { - return float.MaxValue; - } + get => float.MaxValue; set { } } @@ -40,21 +37,16 @@ const float borderText = 3f, borderTotal = borderOutside * 2f + borderInside * 2f + borderText * 2f; - Rect - wholeRect, - borderRect, - textRect; - - Vector2 - textAreaSize; - + Rect wholeRect, borderRect, textRect; + Vector2 textAreaSize; int hash; GUIStyle textGUI, titleGUI; public override Rect position { - get => unit.wholeRect; set => unit.wholeRect = value; + get => unit.wholeRect; + set => unit.wholeRect = value; } public override bool canClip => false; @@ -72,45 +64,37 @@ void MigrateRects() textRect = default; } } + private bool createdStyles; + public override void DrawBackground() { if (!createdStyles) { createdStyles = true; - // Move creation of styles here stop GUI errors since this widget could be created on load - // Not during OnGUI textGUI = new GUIStyle(GUI.skin.label) { richText = true, wordWrap = true }; titleGUI = new GUIStyle(GUI.skin.label) { richText = true, wordWrap = true, alignment = TextAnchor.MiddleLeft, fontSize = 10 }; } if (hash == 0) hash = unit.GetHashCode(); - // If first time running, create a palette. if (!CommentNodeInspector.initialised) { CommentNodeInspector.UpdatePalette(); CommentNodeInspector.initialised = true; } - // If unit locked to palette, grab the assigned color if (unit.lockedToPalette) { unit.color = CommentNodeInspector.colorPalette[unit.customPalette ? 1 : 0, unit.paletteSelection.row, unit.paletteSelection.col] / 3f; unit.fontColor = CommentNodeInspector.fontPalette[unit.customPalette ? 2 : unit.fontColorize ? 1 : 0, unit.paletteSelection.row, unit.paletteSelection.col]; } - // Set text area GUI style textGUI.fontStyle = unit.fontBold && unit.fontItalic ? FontStyle.BoldAndItalic : unit.fontBold ? FontStyle.Bold : unit.fontItalic ? FontStyle.Italic : FontStyle.Normal; textGUI.fontSize = unit.fontSize; textGUI.alignment = unit.alignCentre ? TextAnchor.MiddleCenter : TextAnchor.MiddleLeft; - // Get text area xy size textAreaSize = textGUI.CalcSizeWithConstraints(new GUIContent(unit.comment), new Vector2(Mathf.Round(unit.maxWidth - borderTotal), 1000f)); textAreaSize.y = textGUI.CalcHeight(new GUIContent(unit.comment), unit.maxWidth - borderTotal); - // Set whole area rect unit.wholeRect = new Rect(unit.position.x, unit.position.y, unit.hasTitle ? Mathf.Max(titleGUI.CalcSize(new GUIContent(unit.title)).x + borderTotal, Mathf.Clamp(textAreaSize.x + borderTotal, unit.autoWidth ? borderTotal : unit.maxWidth, unit.maxWidth)) : Mathf.Clamp(textAreaSize.x + borderTotal, unit.autoWidth ? borderTotal : unit.maxWidth, unit.maxWidth), Mathf.Clamp(textAreaSize.y + borderTotal, borderTotal, 1000)); - // Resource - https://unitylist.com/p/5c3/Unity-editor-icons - - // Draw border if mouse present if (unit.wholeRect.Contains(e.mousePosition) || selection.Contains(unit)) { GUI.DrawTexture(unit.wholeRect, Texture2D.whiteTexture, ScaleMode.ScaleAndCrop, true, 0, unit.color * new Color(0.5f, 0.5f, 0.5f, 0.5f), 0, borderOutside); @@ -118,7 +102,7 @@ public override void DrawBackground() List invalidIndexs = new List(); int index = 0; - // Draw connections to other units + foreach (var connectedElement in unit.connectedElements) { if (connectedElement == null || !canvas.widgetProvider.IsValid(connectedElement)) @@ -128,13 +112,14 @@ public override void DrawBackground() } var elementWidget = canvas.Widget(connectedElement); var lineColor = unit.color; + if (unit.curvedLine) { Vector3 start = new Vector3(unit.position.x + unit.wholeRect.width / 2, unit.position.y + unit.wholeRect.height / 2, 0); Vector3 end = GetElementPosition(connectedElement, elementWidget); var targetEdge = CompareVectors(start, end); Vector3 connectionEnd = CorrectLineEnd(targetEdge, new Vector2(GetEdgePosition(elementWidget.position, targetEdge, connectedElement).x, GetEdgePosition(elementWidget.position, targetEdge, connectedElement).y)); - // Draw the connection + GraphGUI.DrawConnection( lineColor, start, @@ -159,9 +144,12 @@ public override void DrawBackground() var targetEdge = CompareVectors(start, end); Vector3 connectionEnd = CorrectLineEnd(targetEdge, new Vector2(GetEdgePosition(elementWidget.position, targetEdge, connectedElement).x, GetEdgePosition(elementWidget.position, targetEdge, connectedElement).y)); Vector3[] points = { start, connectionEnd }; + + Color prevHandles = Handles.color; Handles.color = lineColor; Handles.DrawAAPolyLine(5f, points); - Handles.color = Color.white; + Handles.color = prevHandles; + Edge edge = CompareVectors(start, end); Vector3 arrowBase = GetEdgePosition(elementWidget.position, edge, connectedElement); DrawArrowheadAtEnd(arrowBase, edge, lineColor); @@ -174,13 +162,12 @@ public override void DrawBackground() unit.connectedElements.RemoveAt(_index); } - // Get inner area rect unit.borderRect = unit.wholeRect.Offset(xy: borderOutside, centre: true); - // Draw border GUI.DrawTexture(unit.borderRect, Texture2D.whiteTexture, ScaleMode.ScaleAndCrop, true, 0, unit.color, 0, 7); GUI.DrawTexture(unit.borderRect, Texture2D.whiteTexture, ScaleMode.ScaleAndCrop, true, 0, unit.color * (2f - unit.color.grayscale), borderInside, 7); } + private Vector2 GetElementPosition(IGraphElement graphElement, IGraphElementWidget elementWidget) { if (graphElement is GraphGroup graphGroup) @@ -251,24 +238,23 @@ void DrawArrowheadAtEnd(Vector3 arrowBase, Edge edge, Color color) throw new System.ArgumentException("Invalid edge specified for arrowhead."); } - // Calculate arrowhead points (tip + two side points) Vector3 leftPoint = arrowBase + (direction * arrowLength) + (perpendicular * arrowWidth); Vector3 rightPoint = arrowBase + (direction * arrowLength) - (perpendicular * arrowWidth); - // Create the arrowhead polygon points (tip and sides) Vector3[] arrowPoints = new Vector3[] { - arrowBase, - leftPoint, - rightPoint + arrowBase, + leftPoint, + rightPoint }; + Color prevColor = Handles.color; Handles.color = color; - Handles.DrawAAConvexPolygon(arrowPoints); - - Handles.color = Color.white; + Handles.DrawAAPolyLine(3f, new Vector3[] { leftPoint, arrowBase, rightPoint, leftPoint }); + Handles.color = prevColor; } + #if VISUAL_SCRIPTING_1_8_0_OR_GREATER public Vector2 GetEdgePosition(Rect target, Edge edge, IGraphElement graphElement) { @@ -276,11 +262,7 @@ public Vector2 GetEdgePosition(Rect target, Edge edge, IGraphElement graphElemen { case Edge.Top: { - if (graphElement is GraphGroup or StickyNote) - { - return new Vector2(target.center.x, target.yMin); - } - else if (graphElement is CommentNode) + if (graphElement is GraphGroup || graphElement is StickyNote || graphElement is CommentNode) { return new Vector2(target.center.x, target.yMin); } @@ -288,11 +270,7 @@ public Vector2 GetEdgePosition(Rect target, Edge edge, IGraphElement graphElemen } case Edge.Bottom: { - if (graphElement is GraphGroup or StickyNote) - { - new Vector2(target.center.x, target.yMax); - } - else if (graphElement is CommentNode) + if (graphElement is GraphGroup || graphElement is StickyNote || graphElement is CommentNode) { return new Vector2(target.center.x, target.yMax); } @@ -329,11 +307,7 @@ public Vector2 GetEdgePosition(Rect target, Edge edge, IGraphElement graphElemen { case Edge.Top: { - if (graphElement is GraphGroup) - { - return new Vector2(target.center.x, target.yMin); - } - else if (graphElement is CommentNode) + if (graphElement is GraphGroup || graphElement is CommentNode) { return new Vector2(target.center.x, target.yMin); } @@ -341,11 +315,7 @@ public Vector2 GetEdgePosition(Rect target, Edge edge, IGraphElement graphElemen } case Edge.Bottom: { - if (graphElement is GraphGroup) - { - new Vector2(target.center.x, target.yMax); - } - else if (graphElement is CommentNode) + if (graphElement is GraphGroup || graphElement is CommentNode) { return new Vector2(target.center.x, target.yMax); } @@ -376,6 +346,7 @@ public Vector2 GetEdgePosition(Rect target, Edge edge, IGraphElement graphElemen } } #endif + public Edge CompareVectors(Vector2 first, Vector2 second) { float deltaX = second.x - first.x; @@ -405,12 +376,16 @@ public Edge CalculateStartEnd(Vector2 first, Vector2 second) return (deltaX > 0) ? Edge.Left : Edge.Right; } } - +#if NEW_UNIT_UI + protected override bool AllowRectSnapping => false; +#endif public override void HandleInput() { base.HandleInput(); - if (canvas.selection.Contains(unit)) + bool isEditingText = GUI.GetNameOfFocusedControl() == "commentField" + hash; + + if (!isEditingText && canvas.selection.Contains(unit) && e.freeType == EventType.KeyDown && !e.ctrlOrCmd && !e.alt && !e.shift) { if (e.keyCode == KeyCode.C) { @@ -423,12 +398,12 @@ public override void HandleInput() } } Reposition(); + e.Use(); } else if (e.keyCode == KeyCode.X) { metadata["connectedElements"].RecordUndo(); - var connectedElements = new List(); - connectedElements.AddRange(unit.connectedElements); + var connectedElements = new List(unit.connectedElements); foreach (var element in connectedElements) { if (unit.connectedElements.Contains(element) && canvas.selection.Contains(element)) @@ -437,6 +412,7 @@ public override void HandleInput() } } Reposition(); + e.Use(); } } } @@ -468,58 +444,54 @@ protected override IEnumerable contextOptions public override void DrawForeground() { - GUI.contentColor = Color.white; - if (unit.hasTitle) - EditorGUI.LabelField(new Rect(unit.position.x + borderOutside + 7f, unit.position.y, unit.wholeRect.width, borderOutside), unit.title, titleGUI); - - GUI.contentColor = unit.fontColor; + Color originalContentColor = GUI.contentColor; - unit.textRect = unit.borderRect.Offset(xy: borderText, centre: true); - // If mouse hovering over unit - if (unit.textRect.Contains(e.mousePosition)) + try { - GUI.SetNextControlName("commentField" + hash.ToString()); - EditorGUI.BeginChangeCheck(); - var comment = EditorGUI.TextArea(unit.textRect, unit.comment, textGUI); - if (EditorGUI.EndChangeCheck()) + if (unit.hasTitle) { - metadata["comment"].RecordUndo(); - metadata["comment"].value = comment; + GUI.contentColor = Color.white; + EditorGUI.LabelField(new Rect(unit.position.x + borderOutside + 7f, unit.position.y, unit.wholeRect.width, borderOutside), unit.title, titleGUI); } - return; - } - // Draw main comment - // If unit text selected - else if (GUI.GetNameOfFocusedControl() == "commentField" + hash.ToString()) - { - EditorGUI.BeginChangeCheck(); - var comment = EditorGUI.TextArea(unit.textRect, unit.comment, textGUI); - if (EditorGUI.EndChangeCheck()) + + GUI.contentColor = unit.fontColor; + unit.textRect = unit.borderRect.Offset(xy: borderText, centre: true); + + string controlName = "commentField" + hash; + if (unit.textRect.Contains(e.mousePosition) || GUI.GetNameOfFocusedControl() == controlName) { - metadata["comment"].RecordUndo(); - metadata["comment"].value = comment; + GUI.SetNextControlName(controlName); + EditorGUI.BeginChangeCheck(); + var comment = EditorGUI.TextArea(unit.textRect, unit.comment, textGUI); + if (EditorGUI.EndChangeCheck()) + { + metadata["comment"].RecordUndo(); + metadata["comment"].value = comment; + } + return; } - GUI.contentColor = Color.white; - return; - } - // Draw outline? - if (unit.hasOutline) - { - GUI.contentColor = unit.fontColor.maxColorComponent > 0.5f ? unit.color * 0.9f * (unit.color.maxColorComponent / 1f) : (unit.color * 0.9f * (1f / unit.color.maxColorComponent)).WithAlpha(1f); + if (unit.hasOutline) + { + GUI.contentColor = unit.fontColor.maxColorComponent > 0.5f + ? unit.color * 0.9f * (unit.color.maxColorComponent / 1f) + : (unit.color * 0.9f * (1f / unit.color.maxColorComponent)).WithAlpha(1f); + + float outline = Mathf.Max(unit.fontSize / 60f, 1f); + EditorGUI.LabelField(unit.textRect.Offset(x: -outline, y: -outline), unit.comment, new GUIStyle(textGUI) { fontSize = unit.fontSize + 1 }); + EditorGUI.LabelField(unit.textRect.Offset(x: outline, y: outline), unit.comment, new GUIStyle(textGUI) { fontSize = unit.fontSize + 1 }); + EditorGUI.LabelField(unit.textRect.Offset(x: -outline, y: outline), unit.comment, new GUIStyle(textGUI) { fontSize = unit.fontSize + 1 }); + EditorGUI.LabelField(unit.textRect.Offset(x: outline, y: -outline), unit.comment, new GUIStyle(textGUI) { fontSize = unit.fontSize + 1 }); + GUI.contentColor = unit.fontColor; + } - float outline = Mathf.Max(unit.fontSize / 60f, 1f); - EditorGUI.LabelField(unit.textRect.Offset(x: -outline, y: -outline), unit.comment, new GUIStyle(textGUI) { fontSize = unit.fontSize + 1 }); - EditorGUI.LabelField(unit.textRect.Offset(x: outline, y: outline), unit.comment, new GUIStyle(textGUI) { fontSize = unit.fontSize + 1 }); - EditorGUI.LabelField(unit.textRect.Offset(x: -outline, y: outline), unit.comment, new GUIStyle(textGUI) { fontSize = unit.fontSize + 1 }); - EditorGUI.LabelField(unit.textRect.Offset(x: outline, y: -outline), unit.comment, new GUIStyle(textGUI) { fontSize = unit.fontSize + 1 }); - GUI.contentColor = unit.fontColor; + EditorGUI.LabelField(unit.textRect, unit.comment, textGUI); + unit.position = unit.wholeRect.position; + } + finally + { + GUI.contentColor = originalContentColor; } - - EditorGUI.LabelField(unit.textRect, unit.comment, textGUI); - GUI.contentColor = Color.white; - - unit.position = unit.wholeRect.position; } } } \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Widgets/FuzzyLiteralWidget.cs b/Editor/Nodes/Fundamentals/Widgets/FuzzyLiteralWidget.cs index c9b47361..087194d0 100644 --- a/Editor/Nodes/Fundamentals/Widgets/FuzzyLiteralWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/FuzzyLiteralWidget.cs @@ -13,7 +13,7 @@ public FuzzyLiteralWidget(FlowCanvas canvas, FuzzyLiteral unit) : base(canvas, u public override void DrawForeground() { - var Literal = new Literal(unit.type, unit.value); + var Literal = new Literal(unit.type ?? typeof(int), unit.value ?? 0); var unitPosition = unit.position; var preservation = UnitPreservation.Preserve(unit); context.BeginEdit(); diff --git a/Editor/Nodes/Fundamentals/Widgets/LiteralWidget.cs b/Editor/Nodes/Fundamentals/Widgets/LiteralWidget.cs index d8a3c518..f17eb67b 100644 --- a/Editor/Nodes/Fundamentals/Widgets/LiteralWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/LiteralWidget.cs @@ -1,4 +1,4 @@ -# if NEW_UNIT_UI +#if NEW_UNIT_UI using UnityEditor; using UnityEngine; using System.Linq; @@ -55,74 +55,73 @@ public override void CachePosition() var edgeX = edgeOrigin.x; var edgeY = edgeOrigin.y; - const float compactX = 0.8f; + iconPosition = new Rect(edgeX, edgeY, 0, 0); + titlePosition = new Rect(edgeX, edgeY, 0, 0); - var titleWidth = Styles.title.CalcSize(titleContent).x; - var iconSize = Styles.iconSize; - var innerY = edgeY; - var innerX = edgeX; - - iconPosition = new Rect(innerX, innerY, iconSize, iconSize); - - titlePosition = new Rect( - iconPosition.xMax + Styles.spaceAfterIcon * compactX, - innerY, - titleWidth, - iconSize - ); + var validOutput = outputs.OfType().FirstOrDefault(); - var totalWidth = titlePosition.xMax + 20f - edgeX; - var totalHeight = iconSize; + var invalidInputs = inputs.Cast().ToList(); + var invalidOutputs = outputs.Cast() + .Where(p => p != validOutput) + .ToList(); + float addonWidth = 0f; + float addonHeight = 0f; if (showHeaderAddon) { - var width = GetHeaderAddonWidth(); - var height = GetHeaderAddonHeight(width); - - headerAddonPosition = new Rect( - titlePosition.x, - titlePosition.yMax + 2f, - width, - height - ); - - totalWidth = Mathf.Max(totalWidth, headerAddonPosition.xMax + 20f - edgeX); - totalHeight = headerAddonPosition.yMax - edgeY; + addonWidth = GetHeaderAddonWidth(); + addonHeight = GetHeaderAddonHeight(addonWidth); } - var validOutput = outputs.OfType().FirstOrDefault(); - var invalidOutputs = outputs - .Where(p => p is InvalidOutputWidget) - .Cast() - .ToList(); - - float portsStartY = edgeY + totalHeight + Styles.spaceBetweenPorts; - + float inspectorX = edgeX + 5f; +#if !NEW_UNIT_STYLE + headerAddonPosition = new Rect(inspectorX, edgeY + 4.5f, addonWidth, addonHeight); +#else + headerAddonPosition = new Rect(inspectorX, edgeY + 2f, addonWidth, addonHeight); +#endif if (validOutput != null) { - float visualCenterY = Styles.spaceBetweenPorts + edgeY + (totalHeight / 2f) - (validOutput.GetHeight() / 2f); - validOutput.y = visualCenterY; + validOutput.y = headerAddonPosition.y + (addonHeight / 2f) - (validOutput.GetHeight() / 2f); +#if !NEW_UNIT_STYLE + validOutput.y += 2.5f; +#endif + } - portsStartY += validOutput.GetHeight() + Styles.spaceBetweenPorts; + bool hasInvalidPorts = false; + float inputY = headerAddonPosition.y + addonHeight + 10f; + float maxInputWidth = 0f; + foreach (var port in invalidInputs) + { + hasInvalidPorts = true; - totalWidth += validOutput.GetInnerWidth(); + port.y = inputY; + inputY += port.GetHeight() + Styles.spaceBetweenPorts; + maxInputWidth = Mathf.Max(maxInputWidth, port.GetInnerWidth()); } + float outputY = (validOutput != null) ? validOutput.y + validOutput.GetHeight() + Styles.spaceBetweenPorts : headerAddonPosition.y; + float maxOutputWidth = (validOutput != null) ? validOutput.GetInnerWidth() : 0f; + + var invalidOutputY = headerAddonPosition.y + addonHeight + 10f; + foreach (var port in invalidOutputs) { - port.y = portsStartY; - portsStartY += port.GetHeight() + Styles.spaceBetweenPorts; + hasInvalidPorts = true; - totalWidth = Mathf.Max( - totalWidth, - port.GetInnerWidth() + 20f - ); + port.y = invalidOutputY; + invalidOutputY += port.GetHeight() + Styles.spaceBetweenPorts; + maxOutputWidth = Mathf.Max(maxOutputWidth, port.GetInnerWidth()); } - if (invalidOutputs.Count > 0) - { - totalHeight = portsStartY - edgeY; - } + float totalWidth = 15f + addonWidth + maxInputWidth + maxOutputWidth; + +#if NEW_UNIT_STYLE + const float heightPadding = 0; +#else + const float heightPadding = 5; +#endif + + float totalHeight = !hasInvalidPorts ? headerAddonPosition.height + heightPadding : Mathf.Max(headerAddonPosition.height + heightPadding, inputY - edgeY, outputY - edgeY); _position = new Rect(edgeX, edgeY, totalWidth, totalHeight); } diff --git a/Editor/Nodes/Fundamentals/Widgets/ManualEventWidget.cs b/Editor/Nodes/Fundamentals/Widgets/ManualEventWidget.cs index b9346ae8..5c241c3c 100644 --- a/Editor/Nodes/Fundamentals/Widgets/ManualEventWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/ManualEventWidget.cs @@ -15,8 +15,12 @@ public ManualEventWidget(FlowCanvas canvas, ManualEvent unit) : base(canvas, uni public override void DrawForeground() { base.DrawForeground(); - - var buttonPosition = new Rect(position.x + 1, position.y + 40 + 5, position.width - 8 + 6, 24); +#if NEW_UNIT_STYLE + const int yPadding = 48; +#else + const int yPadding = 45; +#endif + var buttonPosition = new Rect(position.x + 1, position.y + yPadding, position.width - 8 + 6, 24); if (GUI.Button(buttonPosition, "Trigger")) { diff --git a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ControlConnectionWidget.cs b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ControlConnectionWidget.cs index cbef37c3..d6409f91 100644 --- a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ControlConnectionWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ControlConnectionWidget.cs @@ -35,57 +35,9 @@ protected override void DrawDroplet(Rect position) } } - protected override void DrawConnection() - { - var color = this.color; - - var sourceWidget = canvas.Widget(connection.source); - var destinationWidget = canvas.Widget(connection.destination); - - var highlight = !canvas.isCreatingConnection && (sourceWidget.isMouseOver || destinationWidget.isMouseOver); - - var willDisconnect = sourceWidget.willDisconnect || destinationWidget.willDisconnect; - - if (willDisconnect) - { - color = UnitConnectionStyles.disconnectColor; - } - else if (highlight) - { - color = UnitConnectionStyles.highlightColor; - } - else if (colorIfActive) - { - if (EditorApplication.isPaused) - { - if (EditorTimeBinding.frame == ConnectionDebugData.lastInvokeFrame) - { - color = UnitConnectionStyles.activeColor; - } - } - else - { - color = Color.Lerp(UnitConnectionStyles.activeColor, color, (EditorTimeBinding.time - ConnectionDebugData.lastInvokeTime) / UnitWidget.Styles.invokeFadeDuration); - } - } + protected override Edge sourceEdge => Edge.Bottom; - float minBend = 20f; - - var thickness = 3; - - GraphGUI.DrawConnection( - color, - sourceHandleEdgeCenter, - destinationHandleEdgeCenter, - Edge.Bottom, - Edge.Top, - null, - Vector2.zero, - UnitConnectionStyles.relativeBend, - minBend, - thickness - ); - } + protected override Edge destinationEdge => Edge.Top; #endregion diff --git a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ControlInputWidget.cs b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ControlInputWidget.cs index 2836cfbe..786d8beb 100644 --- a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ControlInputWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ControlInputWidget.cs @@ -9,9 +9,11 @@ public ControlInputWidget(FlowCanvas canvas, ControlInput port) : base(canvas, p protected override Edge edge => Edge.Top; - protected override Texture handleTextureConnected => PathUtil.Load("ConnectedHandle", CommunityEditorPath.Fundamentals)?[12]; + protected override Edge connectionEndEdge => Edge.Bottom; - protected override Texture handleTextureUnconnected => PathUtil.Load("UnconnectedHandle", CommunityEditorPath.Fundamentals)?[12]; + protected override Texture handleTextureConnected => CommunityStyles.controlPortConnected; + + protected override Texture handleTextureUnconnected => CommunityStyles.controlPortUnconnected; protected override bool colorIfActive => !BoltFlow.Configuration.animateControlConnections || !BoltFlow.Configuration.animateValueConnections; @@ -42,6 +44,8 @@ public override void CachePosition() identifierPosition = identifierPosition.Encompass(labelPosition); this.labelPosition = labelPosition; } + + surroundPosition = Styles.surroundPadding.Add(identifierPosition); } } } diff --git a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ControlOutputWidget.cs b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ControlOutputWidget.cs index f8c16e2b..aebd22eb 100644 --- a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ControlOutputWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ControlOutputWidget.cs @@ -7,26 +7,15 @@ public class ControlOutputWidget : UnitOutputPortWidget { public ControlOutputWidget(FlowCanvas canvas, ControlOutput port) : base(canvas, port) { } - protected override Texture handleTextureConnected => PathUtil.Load("ConnectedHandle", CommunityEditorPath.Fundamentals)?[12]; + protected override Texture handleTextureConnected => CommunityStyles.controlPortConnected; - protected override Texture handleTextureUnconnected => PathUtil.Load("UnconnectedHandle", CommunityEditorPath.Fundamentals)?[12]; + protected override Texture handleTextureUnconnected => CommunityStyles.controlPortUnconnected; protected override Edge edge => Edge.Bottom; - protected override bool colorIfActive => !BoltFlow.Configuration.animateControlConnections || !BoltFlow.Configuration.animateValueConnections; - - // public override void CachePosition() - // { - // base.CachePosition(); - // var unitPosition = unitWidget.position; + protected override Edge connectionEndEdge => Edge.Top; - // var y = unitPosition.yMax + Styles.spaceBetweenEdgeAndHandle * 2; - - // handlePosition = new Rect(x, y, Styles.handleSize.x, Styles.handleSize.y); - // _position = handlePosition; - // identifierPosition = handlePosition; - // surroundPosition = Styles.surroundPadding.Add(identifierPosition); - // } + protected override bool colorIfActive => !BoltFlow.Configuration.animateControlConnections || !BoltFlow.Configuration.animateValueConnections; } } #endif \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/HorizontalUnitWidget.cs b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/HorizontalUnitWidget.cs new file mode 100644 index 00000000..e5771d43 --- /dev/null +++ b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/HorizontalUnitWidget.cs @@ -0,0 +1,1014 @@ +#if NEW_UNIT_UI && !ENABLE_VERTICAL_FLOW +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; +using Unity.VisualScripting.Community.Libraries.Humility; +namespace Unity.VisualScripting.Community +{ + public class UnitWidget : NodeWidget, IUnitWidget where TUnit : class, IUnit + { + public UnitWidget(FlowCanvas canvas, TUnit unit) : base(canvas, unit) + { + unit.onPortsChanged += CacheDefinition; + unit.onPortsChanged += SubWidgetsChanged; + } + + public override void Dispose() + { + base.Dispose(); + + unit.onPortsChanged -= CacheDefinition; + unit.onPortsChanged -= SubWidgetsChanged; + } + + public override IEnumerable subWidgets => unit.ports.Select(port => canvas.Widget(port)); + + #region Model + + protected TUnit unit => element; + + IUnit IUnitWidget.unit => unit; + + protected IUnitDebugData unitDebugData => GetDebugData(); + + private UnitDescription description; + + private UnitAnalysis analysis => unit.Analysis(context); + + protected readonly List ports = new List(); + + protected readonly List inputs = new List(); + + protected readonly List outputs = new List(); + + private readonly List settingNames = new List(); + + protected readonly List settings = new List(); + + + protected override void CacheItemFirstTime() + { + base.CacheItemFirstTime(); + CacheDefinition(); + } + + protected virtual void CacheDefinition() + { + inputs.Clear(); + outputs.Clear(); + ports.Clear(); + inputs.AddRange(unit.inputs.Select(port => canvas.Widget(port))); + outputs.AddRange(unit.outputs.Select(port => canvas.Widget(port))); + ports.AddRange(inputs); + ports.AddRange(outputs); + + Reposition(); + } + + protected override void CacheDescription() + { + description = unit.Description(); + + titleContent.text = description.shortTitle; + titleContent.tooltip = description.summary; + surtitleContent.text = description.surtitle; + subtitleContent.text = description.subtitle; + + Reposition(); + } + + protected override void CacheMetadata() + { + settingNames.Clear(); + + settingNames.AddRange(metadata.valueType + .GetMembers() + .Where(mi => mi.HasAttribute()) + .OrderBy(mi => mi.GetAttributes().OfType().FirstOrDefault()?.order ?? int.MaxValue) + .ThenBy(mi => mi.MetadataToken) + .Select(mi => mi.Name)); + + foreach (var name in settingNames) + { + settings.Add(metadata[name]); + } + + lock (settingLabelsContents) + { + settingLabelsContents.Clear(); + + foreach (var setting in settings) + { + var settingLabel = setting.GetAttribute().label; + + GUIContent settingContent; + + if (string.IsNullOrEmpty(settingLabel)) + { + settingContent = null; + } + else + { + settingContent = new GUIContent(settingLabel); + } + + settingLabelsContents.Add(setting, settingContent); + } + } + + Reposition(); + } + + public virtual Inspector GetPortInspector(IUnitPort port, Metadata metadata) + { + return metadata.Inspector(); + } + + #endregion + + + #region Lifecycle + + public override bool foregroundRequiresInput => showSettings || unit.valueInputs.Any(vip => vip.hasDefaultValue); + + protected virtual IEnumerable SnapTargets + { + get + { + foreach (var e in graph.elements) + { + if (e != element && !(e is IUnitConnection)) + { + yield return e; + } + } + } + } + + private List _cachedSnapTargets; + + public override void HandleInput() + { + if (AllowRectSnapping && isDragging && e.ctrlOrCmd) + { + if (_cachedSnapTargets == null) + { + _cachedSnapTargets = new List(); + foreach (var target in SnapTargets) + { + _cachedSnapTargets.Add(SnapTarget(target)); + } + } + + var snapResult = RectUtility.CheckSnap(outerPosition, _cachedSnapTargets, threshold: 15f); + snapLines.Clear(); + + if (snapResult.snapped) + { + var pos = BoltCore.Configuration.snapToGrid ? GraphGUI.SnapToGrid(snapResult.snapPosition) : snapResult.snapPosition; + _position = OuterToEdgePosition(new Rect(pos.x, pos.y, _position.width, _position.height)); + + if (snapResult.hasVerticalLine) snapLines.Add(snapResult.verticalLine); + if (snapResult.hasHorizontalLine) snapLines.Add(snapResult.horizontalLine); + + Reposition(); + } + } + else + { + if (_cachedSnapTargets != null) + { + _cachedSnapTargets = null; + snapLines.Clear(); + } + } + + if (canvas.isCreatingConnection) + { + if (e.IsMouseDown(MouseButton.Left)) + { + var source = canvas.connectionSource; + var destination = source.CompatiblePort(unit); + + if (destination != null) + { + UndoUtility.RecordEditedObject("Connect Nodes"); + source.ValidlyConnectTo(destination); + canvas.connectionSource = null; + canvas.Widget(source.unit).Reposition(); + canvas.Widget(destination.unit).Reposition(); + GUI.changed = true; + } + + e.Use(); + } + else if (e.IsMouseDown(MouseButton.Right)) + { + canvas.CancelConnection(); + e.Use(); + } + } + + base.HandleInput(); + } + + private Rect SnapTarget(IGraphItem e) + { + if (e is Unit unit) + { + return canvas.Widget(unit).outerPosition; + } + return canvas.Widget(e).position; + } + #endregion + + + #region Contents + + protected readonly GUIContent titleContent = new GUIContent(); + + protected readonly GUIContent surtitleContent = new GUIContent(); + + protected readonly GUIContent subtitleContent = new GUIContent(); + + protected readonly Dictionary settingLabelsContents = new Dictionary(); + + #endregion + + + #region Positioning + + protected override bool snapToGrid => BoltCore.Configuration.snapToGrid; + + protected virtual Color? PortsbackgroundColor => null; + + public override IEnumerable positionDependers => ports.Cast(); + + protected Rect _position; + + public override Rect position + { + get { return _position; } + set { unit.position = value.position; } + } + + public Rect titlePosition { get; protected set; } + + public Rect surtitlePosition { get; protected set; } + + public Rect subtitlePosition { get; protected set; } + + public Rect iconPosition { get; protected set; } + + public List iconsPositions { get; protected set; } = new List(); + + public Dictionary settingsPositions { get; } = new Dictionary(); + + public Rect headerAddonPosition { get; protected set; } + + public Rect portsBackgroundPosition { get; protected set; } + + public override void CachePosition() + { + List _settings = settings.ToList(); + float inputsWidth = 0f; + for (int i = 0; i < inputs.Count; i++) + { + inputsWidth = Mathf.Max(inputsWidth, inputs[i].GetInnerWidth()); + } + + float outputsWidth = 0f; + for (int i = 0; i < outputs.Count; i++) + { + outputsWidth = Mathf.Max(outputsWidth, outputs[i].GetInnerWidth()); + } + + float portsWidth = inputsWidth + Styles.spaceBetweenInputsAndOutputs + outputsWidth; + + settingsPositions.Clear(); + float settingsWidth = 0f; + + if (showSettings) + { + for (int i = 0; i < _settings.Count; i++) + { + var setting = _settings[i]; + float settingWidth = 0f; + var labelContent = settingLabelsContents[setting]; + + if (labelContent != null) + { + settingWidth += Styles.settingLabel.CalcSize(labelContent).x; + } + + settingWidth += setting.Inspector().GetAdaptiveWidth(); + settingWidth = Mathf.Min(settingWidth, Styles.maxSettingsWidth); + + settingsPositions.Add(setting, new Rect(0, 0, settingWidth, 0)); + settingsWidth = Mathf.Max(settingsWidth, settingWidth); + } + } + + float headerAddonWidth = showHeaderAddon ? GetHeaderAddonWidth() : 0f; + float headerTextWidth = Styles.title.CalcSize(titleContent).x; + + if (showSurtitle) + headerTextWidth = Mathf.Max(headerTextWidth, Styles.surtitle.CalcSize(surtitleContent).x); + + if (showSubtitle) + headerTextWidth = Mathf.Max(headerTextWidth, Styles.subtitle.CalcSize(subtitleContent).x); + + float iconsWidth = 0f; + if (showIcons && description.icons.Length > 0) + { + int iconsColumns = Mathf.CeilToInt((float)description.icons.Length / Styles.iconsPerColumn); + iconsWidth = (iconsColumns * Styles.iconsSize) + ((iconsColumns - 1) * Styles.iconsSpacing); + } + + float headerWidth = Mathf.Max(headerTextWidth + iconsWidth, Mathf.Max(settingsWidth, headerAddonWidth)) + + Styles.iconSize + Styles.spaceAfterIcon; + + float innerWidth = Mathf.Max(portsWidth, headerWidth); + float edgeWidth = InnerToEdgePosition(new Rect(0, 0, innerWidth, 0)).width; + + Vector2 edgeOrigin = unit.position; + float edgeX = edgeOrigin.x; + float edgeY = edgeOrigin.y; + + Vector2 innerOrigin = EdgeToInnerPosition(new Rect(edgeOrigin, Vector2.zero)).position; + float innerX = innerOrigin.x; + float innerY = innerOrigin.y; + + iconPosition = new Rect(innerX, innerY, Styles.iconSize, Styles.iconSize); + float headerTextX = iconPosition.xMax + Styles.spaceAfterIcon; + + float y = innerY; + float headerHeight = 0f; + + if (showSurtitle) + { + float h = Styles.surtitle.CalcHeight(surtitleContent, headerTextWidth); + surtitlePosition = new Rect(headerTextX, y, headerTextWidth, h); + float step = h + Styles.spaceAfterSurtitle; + headerHeight += step; + y += step; + } + + if (showTitle) + { + float h = Styles.title.CalcHeight(titleContent, headerTextWidth); + titlePosition = new Rect(headerTextX, y, headerTextWidth, h); + headerHeight += h; + y += h; + } + + if (showSubtitle) + { + headerHeight += Styles.spaceBeforeSubtitle; + y += Styles.spaceBeforeSubtitle; + float h = Styles.subtitle.CalcHeight(subtitleContent, headerTextWidth); + subtitlePosition = new Rect(headerTextX, y, headerTextWidth, h); + headerHeight += h; + y += h; + } + + iconsPositions.Clear(); + if (showIcons) + { + int row = 0, col = 0; + for (int i = 0; i < description.icons.Length; i++) + { + iconsPositions.Add(new Rect( + innerX + innerWidth - ((col + 1) * Styles.iconsSize) - (col * Styles.iconsSpacing), + innerY + (row * (Styles.iconsSize + Styles.iconsSpacing)), + Styles.iconsSize, Styles.iconsSize)); + + if (++row % Styles.iconsPerColumn == 0) { col++; row = 0; } + } + } + + if (showSettings && _settings.Count > 0) + { + headerHeight += Styles.spaceBeforeSettings; + float settingsTotalHeight = 0f; + + for (int i = 0; i < _settings.Count; i++) + { + var setting = _settings[i]; + float sWidth = settingsPositions[setting].width; + using (LudiqGUIUtility.currentInspectorWidth.Override(sWidth)) + { + float sHeight = LudiqGUI.GetInspectorHeight(null, setting, sWidth, settingLabelsContents[setting] ?? GUIContent.none); + settingsPositions[setting] = new Rect(headerTextX, y, sWidth, sHeight); + + float step = sHeight + Styles.spaceBetweenSettings; + settingsTotalHeight += step; + y += step; + } + } + + settingsTotalHeight -= Styles.spaceBetweenSettings; + y -= Styles.spaceBetweenSettings; + headerHeight += settingsTotalHeight + Styles.spaceAfterSettings; + y += Styles.spaceAfterSettings; + } + + if (showHeaderAddon) + { + float h = GetHeaderAddonHeight(headerAddonWidth); + headerAddonPosition = new Rect(headerTextX, y, headerAddonWidth, h); + headerHeight += h; + y += h; + } + + if (headerHeight < Styles.iconSize) + { + float centeringOffset = (Styles.iconSize - headerHeight) * 0.5f; + if (showTitle) titlePosition = new Rect(titlePosition.x, titlePosition.y + centeringOffset, titlePosition.width, titlePosition.height); + if (showSubtitle) subtitlePosition = new Rect(subtitlePosition.x, subtitlePosition.y + centeringOffset, subtitlePosition.width, subtitlePosition.height); + if (showHeaderAddon) headerAddonPosition = new Rect(headerAddonPosition.x, headerAddonPosition.y + centeringOffset, headerAddonPosition.width, headerAddonPosition.height); + + if (showSettings) + { + for (int i = 0; i < _settings.Count; i++) + { + var rect = settingsPositions[_settings[i]]; + rect.y += centeringOffset; + settingsPositions[_settings[i]] = rect; + } + } + headerHeight = Styles.iconSize; + } + + y = innerY + headerHeight; + float innerHeight = headerHeight; + + if (showPorts) + { + innerHeight += Styles.spaceBeforePorts; + y += Styles.spaceBeforePorts; + + float portsBackgroundY = y; + float portsPaddingTop = Styles.portsBackground.padding.top; + y += portsPaddingTop; + innerHeight += portsPaddingTop; + + float portStartY = y; + float inH = 0f, outH = 0f; + + for (int i = 0; i < inputs.Count; i++) + { + inputs[i].y = y; + float h = inputs[i].GetHeight(); + inH += h + Styles.spaceBetweenPorts; + y += h + Styles.spaceBetweenPorts; + } + if (inputs.Count > 0) inH -= Styles.spaceBetweenPorts; + + y = portStartY; + for (int i = 0; i < outputs.Count; i++) + { + outputs[i].y = y; + float h = outputs[i].GetHeight(); + outH += h + Styles.spaceBetweenPorts; + y += h + Styles.spaceBetweenPorts; + } + if (outputs.Count > 0) outH -= Styles.spaceBetweenPorts; + + float maxPortsH = Mathf.Max(inH, outH); + innerHeight += maxPortsH + Styles.portsBackground.padding.bottom; + + portsBackgroundPosition = new Rect(edgeX, portsBackgroundY, edgeWidth, maxPortsH + portsPaddingTop + Styles.portsBackground.padding.bottom); + } + + float finalEdgeHeight = InnerToEdgePosition(new Rect(0, 0, 0, innerHeight)).height; + _position = new Rect(edgeX, edgeY, edgeWidth, finalEdgeHeight); + } + + protected virtual float GetHeaderAddonWidth() + { + return 0; + } + + protected virtual float GetHeaderAddonHeight(float width) + { + return 0; + } + + #endregion + + + #region Drawing + + protected virtual NodeColorMix baseColor => NodeColor.Gray; + + protected override NodeColorMix color + { + get + { + if (unitDebugData.runtimeException != null) + { + return NodeColor.Red; + } + + var color = baseColor; + + if (analysis.warnings.Count > 0) + { + var mostSevereWarning = Warning.MostSevereLevel(analysis.warnings); + + switch (mostSevereWarning) + { + case WarningLevel.Error: + color = NodeColor.Red; + break; + + case WarningLevel.Severe: + color = NodeColor.Orange; + break; + + case WarningLevel.Caution: + color = NodeColor.Yellow; + + break; + } + } + + if (EditorApplication.isPaused) + { + if (EditorTimeBinding.frame == unitDebugData.lastInvokeFrame) + { + return NodeColor.Blue; + } + } + else + { + var mix = color; + mix.blue = Mathf.Lerp(1, 0, (EditorTimeBinding.time - unitDebugData.lastInvokeTime) / Styles.invokeFadeDuration); + + return mix; + } + + return color; + } + } + + protected override NodeShape shape => NodeShape.Square; + + protected virtual bool showTitle => !string.IsNullOrEmpty(description.shortTitle); + + protected virtual bool showSurtitle => !string.IsNullOrEmpty(description.surtitle); + + protected virtual bool showSubtitle => !string.IsNullOrEmpty(description.subtitle); + + protected virtual bool showIcons => description.icons.Length > 0; + + protected virtual bool showSettings => settingNames.Count > 0; + + protected virtual bool showHeaderAddon => false; + + protected virtual bool showPorts => ports.Count > 0; + + protected override bool dim + { + get + { + var dim = BoltCore.Configuration.dimInactiveNodes && !analysis.isEntered; + + if (isMouseOver || isSelected) + { + dim = false; + } + + if (BoltCore.Configuration.dimIncompatibleNodes && canvas.isCreatingConnection) + { + dim = !unit.ports.Any(p => canvas.connectionSource == p || canvas.connectionSource.CanValidlyConnectTo(p)); + } + + return dim; + } + } + + protected virtual bool AllowRectSnapping => true; + private List snapLines = new List(); + + protected void DrawSnapLines() + { + if (snapLines == null || snapLines.Count == 0) + return; + + Handles.color = new Color32(64, 113, 156, 255); + foreach (var line in snapLines) + { + Handles.DrawLine(line.start, line.end); + } + } + + private void ConvertToEmbed() + { + NodeSelection.Convert(GraphSource.Embed); + } + + private void ConvertToMacro() + { + NodeSelection.Convert(GraphSource.Macro); + } + + public override void DrawForeground() + { + if (AllowRectSnapping && isDragging && e.ctrlOrCmd) + DrawSnapLines(); + + BeginDim(); + + base.DrawForeground(); + + DrawIcon(); + + if (showSurtitle) + { + DrawSurtitle(); + } + + if (showTitle) + { + DrawTitle(); + } + + if (showSubtitle) + { + DrawSubtitle(); + } + + if (showIcons) + { + DrawIcons(); + } + + if (showSettings) + { + DrawSettings(); + } + + if (showHeaderAddon) + { + DrawHeaderAddon(); + } + + if (showPorts) + { + DrawPortsBackground(); + } + + EndDim(); + } + + protected void DrawIcon() + { + var icon = description.icon ?? BoltFlow.Icons.unit; + + if (icon != null && icon[(int)iconPosition.width]) + { + GUI.DrawTexture(iconPosition, icon[(int)iconPosition.width]); + } + } + + protected void DrawTitle() + { + GUI.Label(titlePosition, titleContent, invertForeground ? Styles.titleInverted : Styles.title); + } + + protected void DrawSurtitle() + { + GUI.Label(surtitlePosition, surtitleContent, invertForeground ? Styles.surtitleInverted : Styles.surtitle); + } + + protected void DrawSubtitle() + { + GUI.Label(subtitlePosition, subtitleContent, invertForeground ? Styles.subtitleInverted : Styles.subtitle); + } + + protected void DrawIcons() + { + for (int i = 0; i < description.icons.Length; i++) + { + var icon = description.icons[i]; + var position = iconsPositions[i]; + + GUI.DrawTexture(position, icon?[(int)position.width]); + } + } + + private void DrawSettings() + { + if (graph.zoom < FlowCanvas.inspectorZoomThreshold) + { + return; + } + + EditorGUI.BeginDisabledGroup(!e.IsRepaint && isMouseThrough && !isMouseOver); + + EditorGUI.BeginChangeCheck(); + + foreach (var setting in settings) + { + DrawSetting(setting); + } + + if (EditorGUI.EndChangeCheck()) + { + unit.Define(); + Reposition(); + } + + EditorGUI.EndDisabledGroup(); + } + + protected void DrawSetting(Metadata setting) + { + var settingPosition = settingsPositions[setting]; + + using (LudiqGUIUtility.currentInspectorWidth.Override(settingPosition.width)) + using (Inspector.expandTooltip.Override(false)) + { + var label = settingLabelsContents[setting]; + + if (label == null) + { + LudiqGUI.Inspector(setting, settingPosition, GUIContent.none); + } + else + { + using (Inspector.defaultLabelStyle.Override(Styles.settingLabel)) + using (LudiqGUIUtility.labelWidth.Override(Styles.settingLabel.CalcSize(label).x)) + { + LudiqGUI.Inspector(setting, settingPosition, label); + } + } + } + } + + protected virtual void DrawHeaderAddon() { } + + private IUnitPortWidget Single(IUnitPort targetPort) + { + IUnitPortWidget widget = null; + for (int i = 0; i < ports.Count; i++) + { + if (ports[i].port == targetPort) + { + widget = ports[i]; + break; + } + } + return widget; + } + + protected void DrawPortsBackground() + { + if (canvas.showRelations) + { + foreach (var relation in unit.relations) + { + var sourcePort = relation.source; + var destinationPort = relation.destination; + IUnitPortWidget sourceWidget = Single(sourcePort); + IUnitPortWidget destinationWidget = Single(destinationPort); + var start = sourceWidget.handlePosition.center; + var end = destinationWidget.handlePosition.center; + + var startTangent = start; + var endTangent = end; + + if (relation.source is IUnitInputPort && + relation.destination is IUnitInputPort) + { + startTangent -= new Vector2(20, 0); + endTangent -= new Vector2(32, 0); + } + else + { + startTangent += new Vector2(innerPosition.width / 2, 0); + endTangent += new Vector2(-innerPosition.width / 2, 0); + } + + Handles.DrawBezier + ( + start, + end, + startTangent, + endTangent, + ColorPalette.unityBackgroundMid, + null, + 3 + ); + } + } + else + { + if (e.IsRepaint) + { + Styles.portsBackground.Draw(portsBackgroundPosition, false, false, false, false); + } + } + } + + #endregion + + #region Selecting + + public override bool canSelect => true; + + #endregion + + + #region Dragging + + public override bool canDrag => true; + + public override void ExpandDragGroup(HashSet dragGroup) + { + if (BoltCore.Configuration.carryChildren) + { + foreach (var output in unit.outputs) + { + foreach (var connection in output.connections) + { + if (dragGroup.Contains(connection.destination.unit)) + { + continue; + } + + dragGroup.Add(connection.destination.unit); + + canvas.Widget(connection.destination.unit).ExpandDragGroup(dragGroup); + } + } + } + } + + #endregion + + + #region Deleting + + public override bool canDelete => true; + + #endregion + + + #region Clipboard + + public override void ExpandCopyGroup(HashSet copyGroup) + { + copyGroup.UnionWith(unit.connections.Cast()); + } + + #endregion + + + #region Context + + protected override IEnumerable contextOptions + { + get + { + yield return new DropdownOption((Action)ReplaceUnit, "Replace..."); + + foreach (var baseOption in base.contextOptions) + { + yield return baseOption; + } + + if (selection.Count > 0) + { + yield return new DropdownOption((Action)ConvertToEmbed, "Selection/To Embed Subgraph"); + yield return new DropdownOption((Action)ConvertToMacro, "Selection/To Macro Subgraph"); + } + } + } + + private void ReplaceUnit() + { + UnitWidgetHelper.ReplaceUnit(unit, reference, context, selection, e); + } + + #endregion + + + public static class Styles + { + static Styles() + { + // Disabling word wrap because Unity's CalcSize and CalcHeight + // are broken w.r.t. pixel-perfection and matrix + + title = new GUIStyle(BoltCore.Styles.nodeLabel); + title.padding = new RectOffset(0, 5, 0, 2); + title.margin = new RectOffset(0, 0, 0, 0); + title.fontSize = 12; + title.alignment = TextAnchor.MiddleLeft; + title.wordWrap = false; + + surtitle = new GUIStyle(BoltCore.Styles.nodeLabel); + surtitle.padding = new RectOffset(0, 5, 0, 0); + surtitle.margin = new RectOffset(0, 0, 0, 0); + surtitle.fontSize = 10; + surtitle.alignment = TextAnchor.MiddleLeft; + surtitle.wordWrap = false; + + subtitle = new GUIStyle(surtitle); + subtitle.padding.bottom = 2; + + titleInverted = new GUIStyle(title); + titleInverted.normal.textColor = ColorPalette.unityBackgroundDark; + + surtitleInverted = new GUIStyle(surtitle); + surtitleInverted.normal.textColor = ColorPalette.unityBackgroundDark; + + subtitleInverted = new GUIStyle(subtitle); + subtitleInverted.normal.textColor = ColorPalette.unityBackgroundDark; + +#if NEW_UNIT_STYLE + if (EditorGUIUtility.isProSkin) + { + portsBackground = new GUIStyle + { + padding = new RectOffset(0, 0, 6, 5), + border = new RectOffset(0, 0, 2, 2) + }; + + portsBackground.normal.background = CommunityStyles.MakeBorderedTexture(CommunityStyles.backgroundColor, CommunityStyles.backgroundColor.Darken(0.05f)); + } + else + { + portsBackground = new GUIStyle + { + normal = { background = CommunityStyles.MakeBorderedTexture(CommunityStyles.backgroundColor, CommunityStyles.backgroundColor.Brighten(0.05f)) }, + padding = new RectOffset(0, 0, 6, 5) + }; + } +#else + portsBackground = VisualScripting.UnitWidget.Styles.portsBackground; +#endif + + settingLabel = new GUIStyle(BoltCore.Styles.nodeLabel); + settingLabel.padding.left = 0; + settingLabel.padding.right = 5; + settingLabel.wordWrap = false; + settingLabel.clipping = TextClipping.Clip; + } + + public static readonly GUIStyle title; + + public static readonly GUIStyle surtitle; + + public static readonly GUIStyle subtitle; + + public static readonly GUIStyle titleInverted; + + public static readonly GUIStyle surtitleInverted; + + public static readonly GUIStyle subtitleInverted; + + public static readonly GUIStyle settingLabel; + + public static readonly float spaceAroundLineIcon = 5; + + public static readonly float spaceBeforePorts = 5; + + public static readonly float spaceBetweenInputsAndOutputs = 8; + + public static readonly float spaceBeforeSettings = 2; + + public static readonly float spaceBetweenSettings = 3; + + public static readonly float spaceBetweenPorts = 3; + + public static readonly float spaceAfterSettings = 0; + + public static readonly float maxSettingsWidth = 150; + + public static readonly GUIStyle portsBackground; + + public static readonly float iconSize = IconSize.Medium; + + public static readonly float iconsSize = IconSize.Small; + + public static readonly float iconsSpacing = 3; + + public static readonly int iconsPerColumn = 2; + + public static readonly float spaceAfterIcon = 6; + + public static readonly float spaceAfterSurtitle = 2; + + public static readonly float spaceBeforeSubtitle = 0; + + public static readonly float invokeFadeDuration = 0.5f; + } + } +} +#endif \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/HorizontalUnitWidget.cs.meta b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/HorizontalUnitWidget.cs.meta new file mode 100644 index 00000000..8c9103b2 --- /dev/null +++ b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/HorizontalUnitWidget.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 16c7cb4fbc25b75499cf34e72a9988f0 diff --git a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnifiedVariableUnitWidget.cs b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnifiedVariableUnitWidget.cs index b4dc113f..2a3eba86 100644 --- a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnifiedVariableUnitWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnifiedVariableUnitWidget.cs @@ -9,21 +9,41 @@ namespace Unity.VisualScripting.Community { public sealed class UnifiedVariableUnitWidget : UnitWidget { - private bool isRenaming; - private List<(UnifiedVariableUnit, UnityEngine.Object)> renameTargets = new List<(UnifiedVariableUnit, UnityEngine.Object)>(); - private static List targets = new List(); + #region Reflection Caching + + private static readonly FieldInfo CollectionField = + typeof(VariableDeclarations).GetField("collection", BindingFlags.Instance | BindingFlags.NonPublic); + + private static readonly MethodInfo SetNameMethod = + typeof(VariableDeclaration).GetProperty("name", BindingFlags.Instance | BindingFlags.Public)?.GetSetMethod(true); + + #endregion - private static FieldInfo collectionField = typeof(VariableDeclarations).GetField("collection", BindingFlags.Instance | BindingFlags.NonPublic); - private MethodInfo setNameMethod = typeof(VariableDeclaration).GetProperty("name", BindingFlags.Instance | BindingFlags.Public).GetSetMethod(true); + private static readonly List ActiveRenameTargets = new List(); + private static UnifiedVariableUnit closestToMouse; + + private readonly List<(UnifiedVariableUnit, UnityEngine.Object)> renameTargets = new List<(UnifiedVariableUnit, UnityEngine.Object)>(); + private readonly Func nameInspectorConstructor; + private readonly string controlName; private VariableDeclarationCollection collection; private VariableDeclarationCollection savedCollection; private GameObject storedObject; + private VariableKind previousKind; - private static UnifiedVariableUnit closestToMouse; + private VariableNameInspector nameInspector; + private string newProjectName; + private string oldProjectName; + private bool isRenaming; - private VariableKind previousKind; - private readonly string controlName; + protected override NodeColorMix baseColor => NodeColorMix.TealReadable; + + public UnifiedVariableUnitWidget(FlowCanvas canvas, UnifiedVariableUnit unit) : base(canvas, unit) + { + controlName = $"{unit}_VariableNameInspector"; + + nameInspectorConstructor = metadata => new VariableNameInspector(metadata, GetNameSuggestions, OnVariableRenamed, controlName); + } public override void CachePosition() { @@ -37,364 +57,350 @@ public override void CachePosition() storedObject = null; } + if (collection == null) + { + ResolveVariableCollections(); + } + } + + public override void DrawForeground() + { + base.DrawForeground(); + + if (ActiveRenameTargets.Contains(unit)) + { + GraphGUI.DrawDragAndDropPreviewLabel(new Vector2(edgePosition.x, outerPosition.yMax), "Renaming", typeof(string).Icon()); + } + } + + public override void HandleInput() + { + if (ShouldStartRename()) + { + ExecuteStartRename(); + } + else if (ShouldEndRename()) + { + ExecuteEndRename(); + } + else if (!selection.Contains(unit)) + { + isRenaming = false; + } + + base.HandleInput(); + } + + public override Inspector GetPortInspector(IUnitPort port, Metadata metadata) + { + if (port == unit.name) + { + InspectorProvider.instance.Renew(ref nameInspector, metadata, nameInspectorConstructor); + return nameInspector; + } + + return base.GetPortInspector(port, metadata); + } + + protected override IEnumerable contextOptions + { + get + { + foreach (var option in base.contextOptions) + { + yield return option; + } + + if (!unit.name.hasValidConnection && Flow.CanPredict(unit.name, reference)) + { + yield return new DropdownOption((Action)FindAll, "Find/All"); + yield return new DropdownOption((Action)FindSetters, "Find/Setters"); + yield return new DropdownOption((Action)FindGetters, "Find/Getters"); + } + } + } + + #region Variable Collection Handling + + private void ResolveVariableCollections() + { switch (unit.kind) { case VariableKind.Graph: - if (collection == null) - collection = (VariableDeclarationCollection)collectionField.GetValue(VisualScripting.Variables.Graph(reference)); + collection = GetCollection(VisualScripting.Variables.Graph(reference)); break; - case VariableKind.Object: - if (collection != null) break; - - if (!Flow.CanPredict(unit.@object, reference)) break; - var value = Flow.Predict(unit.@object, reference); - if (value is GameObject @object) + case VariableKind.Object: + if (Flow.CanPredict(unit.@object, reference) && Flow.Predict(unit.@object, reference) is GameObject go) { - if (@object != null && storedObject != @object) + if (go != null && storedObject != go) { - storedObject = @object; - collection = (VariableDeclarationCollection)collectionField.GetValue(VisualScripting.Variables.Object(@object)); + storedObject = go; + collection = GetCollection(VisualScripting.Variables.Object(go)); } } - break; + case VariableKind.Scene: - if (collection == null && reference.scene != null) - collection = (VariableDeclarationCollection)collectionField.GetValue(VisualScripting.Variables.Scene(reference.scene)); + if (reference.scene != null) + collection = GetCollection(VisualScripting.Variables.Scene(reference.scene)); break; + case VariableKind.Application: - if (collection == null) - collection = (VariableDeclarationCollection)collectionField.GetValue(VisualScripting.Variables.Application); + collection = GetCollection(VisualScripting.Variables.Application); break; + case VariableKind.Saved: - if (collection == null) - collection = (VariableDeclarationCollection)collectionField.GetValue(VisualScripting.Variables.Saved); - if (savedCollection == null) - savedCollection = (VariableDeclarationCollection)collectionField.GetValue(SavedVariables.saved); + collection = GetCollection(VisualScripting.Variables.Saved); + savedCollection = GetCollection(SavedVariables.saved); break; } } - private string newProjectName; - private string oldProjectName; - public UnifiedVariableUnitWidget(FlowCanvas canvas, UnifiedVariableUnit unit) : base(canvas, unit) + private static VariableDeclarationCollection GetCollection(VariableDeclarations declarations) { - controlName = unit.ToString() + "_VariableNameInspector"; - nameInspectorConstructor = (metadata) => new VariableNameInspector(metadata, GetNameSuggestions, (oldName, newName) => + return declarations != null ? (VariableDeclarationCollection)CollectionField?.GetValue(declarations) : null; + } + + #endregion + + #region Renaming Logic + + private void OnVariableRenamed(string oldName, string newName) + { + if (!isRenaming) return; + + switch (unit.kind) { - if (isRenaming) - { - switch (unit.kind) - { - case VariableKind.Graph: - { - var declarations = VisualScripting.Variables.Graph(reference); - RenameVariable(oldName, newName, declarations); - } - break; - case VariableKind.Object: - { - if (storedObject == null) break; - - var declarations = VisualScripting.Variables.Object(storedObject); - RenameVariable(oldName, newName, declarations); - } - break; - case VariableKind.Scene: - { - if (reference.scene == null) break; - - var declarations = VisualScripting.Variables.Scene(reference.scene); - RenameVariable(oldName, newName, declarations); - } - break; - case VariableKind.Application: - { - var declarations = VisualScripting.Variables.Application; - newName = RenameVariable(oldName, newName, declarations); - - newProjectName = newName; - } - break; - case VariableKind.Saved: - { - var mainDeclarations = VisualScripting.Variables.Saved; - - newName = RenameVariable(oldName, newName, mainDeclarations); - - if (!Application.isPlaying) - { - var saved = SavedVariables.saved; - - newName = RenameVariable(oldName, newName, saved); - } - - newProjectName = newName; - } - break; - } + case VariableKind.Graph: + RenameVariable(oldName, newName, VisualScripting.Variables.Graph(reference)); + break; - var group = Undo.GetCurrentGroup(); - foreach (var target in renameTargets) - { - if (target.Item1.name.hasValidConnection) continue; + case VariableKind.Object: + if (storedObject != null) + RenameVariable(oldName, newName, VisualScripting.Variables.Object(storedObject)); + break; - if (target.Item2 != null) - Undo.RecordObject(target.Item2, $"Renamed '{oldName}' variable to '{newName}'"); + case VariableKind.Scene: + if (reference.scene != null) + RenameVariable(oldName, newName, VisualScripting.Variables.Scene(reference.scene)); + break; - target.Item1.name.SetDefaultValue(newName); - } - Undo.CollapseUndoOperations(group); + case VariableKind.Application: + newName = RenameVariable(oldName, newName, VisualScripting.Variables.Application); + newProjectName = newName; + break; - if (GUI.GetNameOfFocusedControl() != controlName) + case VariableKind.Saved: + newName = RenameVariable(oldName, newName, VisualScripting.Variables.Saved); + if (!Application.isPlaying) { - isRenaming = false; - targets.Clear(); + newName = RenameVariable(oldName, newName, SavedVariables.saved); } + newProjectName = newName; + break; + } + + int group = Undo.GetCurrentGroup(); + foreach (var (targetUnit, targetObject) in renameTargets) + { + if (targetUnit.name.hasValidConnection) continue; + + if (targetObject != null) + { + Undo.RecordObject(targetObject, $"Renamed '{oldName}' variable to '{newName}'"); } - }, controlName); + + targetUnit.name.SetDefaultValue(newName); + } + Undo.CollapseUndoOperations(group); + + if (GUI.GetNameOfFocusedControl() != controlName) + { + isRenaming = false; + ActiveRenameTargets.Clear(); + } } private string RenameVariable(string oldName, string newName, VariableDeclarations declarations) { - if (declarations.IsDefined(oldName)) - { - var declaration = declarations.GetDeclaration(oldName); + if (declarations == null || !declarations.IsDefined(oldName)) + return newName; - newName = OperateOnString(declarations, newName); + var declaration = declarations.GetDeclaration(oldName); + newName = EnsureUniqueName(declarations, newName); + + collection?.EditorRename(declaration, newName); + SetNameMethod?.Invoke(declaration, new object[] { newName }); - collection.EditorRename(declaration, newName); - setNameMethod.Invoke(declaration, new object[] { newName }); - } return newName; } - private string OperateOnString(VariableDeclarations declarations, string newName) + private static string EnsureUniqueName(VariableDeclarations declarations, string candidateName) { - if (string.IsNullOrEmpty(newName)) - { - int counter = 1; + string baseName = string.IsNullOrEmpty(candidateName) ? "Unnamed Variable" : candidateName; + string finalName = baseName; + int counter = 1; - var baseName = "Unnamed Variable"; - newName = baseName; - while (declarations.IsDefined(newName)) - { - newName = $"{baseName} ({counter++})"; - } - } - else if (declarations.IsDefined(newName)) + while (declarations.IsDefined(finalName)) { - int counter = 1; - - var baseName = newName; - newName = baseName; - while (declarations.IsDefined(newName)) - { - newName = $"{baseName} ({counter++})"; - } + finalName = $"{baseName} ({counter++})"; } - return newName; + + return finalName; } - public override void DrawForeground() + private bool ShouldStartRename() { - base.DrawForeground(); - if (targets.Contains(unit)) - GraphGUI.DrawDragAndDropPreviewLabel(new Vector2(edgePosition.x, outerPosition.yMax), "Renaming", typeof(string).Icon()); + return !unit.name.hasValidConnection && e != null && e.keyCode == KeyCode.F2 && selection.Contains(unit); } - public override void HandleInput() + private void ExecuteStartRename() { - if (!unit.name.hasValidConnection && e != null && e.keyCode == KeyCode.F2 && selection.Contains(unit)) + if (selection.Count(s => s is UnifiedVariableUnit) > 1) { - if (selection.Count(e => e is UnifiedVariableUnit) > 1) - { - if (closestToMouse == null) closestToMouse = unit; - else if (Vector2.Distance(unit.position, e.mousePosition) < Vector2.Distance(closestToMouse.position, e.mousePosition)) - { - closestToMouse = unit; - } - } - else + if (closestToMouse == null || Vector2.Distance(unit.position, e.mousePosition) < Vector2.Distance(closestToMouse.position, e.mousePosition)) { closestToMouse = unit; } - - if (closestToMouse != null && closestToMouse != unit) return; - - if (IsSceneRequired() && reference.gameObject == null) - { - Debug.LogWarning( - $"[Rename Variables] The selected variable is an {unit.kind} variable inside an Asset. " + - $"{reference.rootObject.GetType().DisplayName()}'s do not have access to the scene this graph is used in. Rename the variable directly from the GameObject or Scene itself." - ); - return; - } - - EditorGUI.FocusTextInControl(controlName); - switch (unit.kind) - { - case VariableKind.Flow: - targets = GraphUtility.GetFlowVariablesRenameTargets(unit, unit.defaultValues[unit.name.key] as string, reference); - renameTargets = targets.Select(t => (t, null)).ToList(); - isRenaming = true; - break; - case VariableKind.Graph: - targets = GraphUtility.GetGraphVariablesRenameTargets(graph as FlowGraph, unit.defaultValues[unit.name.key] as string); - renameTargets = targets.Select(t => (t, null)).ToList(); - isRenaming = true; - break; - case VariableKind.Object: - if (Flow.CanPredict(unit.@object, reference)) - { - var value = Flow.Predict(unit.@object, reference); - if (value is GameObject @object) - { - renameTargets = GraphUtility.GetObjectVariablesRenameTargets(reference, @object, unit.defaultValues[unit.name.key] as string); - targets = renameTargets.Select(t => t.Item1).ToList(); - isRenaming = true; - } - } - break; - case VariableKind.Scene: - if (reference.scene != null && SceneVariables.InstantiatedIn(reference.scene.Value)) - { - renameTargets = GraphUtility.GetSceneVariablesRenameTargets(reference, reference.scene, unit.defaultValues[unit.name.key] as string); - targets = renameTargets.Select(t => t.Item1).ToList(); - isRenaming = true; - } - break; - default: - if (Application.isPlaying) - { - Debug.LogWarning($"[Rename Variables] Cannot rename all {unit.kind} variables while in play mode!"); - break; - } - isRenaming = true; - renameTargets = GraphUtility.GetCurrentlyAccessibleProjectUnits(unit.defaultValues[unit.name.key] as string, unit.kind); - targets = renameTargets.Select(t => t.Item1).ToList(); - oldProjectName = unit.defaultValues[unit.name.key] as string; - break; - } } - else if (isRenaming && (!selection.Contains(unit) || - GUI.GetNameOfFocusedControl() != controlName || - e.keyCode == KeyCode.Return || e.keyCode == KeyCode.Escape || !canvas.isMouseOver)) + else { - isRenaming = false; - targets.Clear(); - switch (unit.kind) - { - case VariableKind.Application: - { - bool choice = oldProjectName != newProjectName && EditorUtility.DisplayDialog( - "Update ALL Application Variables?", - "This will go through ALL scenes and macros to find every Variable Unit " - + $"using {oldProjectName} and update it to {newProjectName}.\n\n" - + "This operation is FINAL and cannot be undone!", - "Update All", - "Rename Only" - ); - - if (choice) - { - GraphUtility.RenameApplicationVariables(oldProjectName, newProjectName); - } - } - break; - case VariableKind.Saved: - { - bool choice = oldProjectName != newProjectName && EditorUtility.DisplayDialog( - "Update ALL Saved Variables?", - "This will go through ALL scenes and macros to find every Variable Unit " - + $"using {oldProjectName} and update it to {newProjectName}.\n\n" - + "This operation is FINAL and cannot be undone!", - "Update All", - "Rename Only" - ); - - if (choice) - { - GraphUtility.RenameSavedVariables(oldProjectName, newProjectName); - } - } - break; - } - oldProjectName = null; - newProjectName = null; + closestToMouse = unit; } - else if (!selection.Contains(unit)) + + if (closestToMouse != null && closestToMouse != unit) return; + + if (IsSceneRequired() && reference.gameObject == null) { - isRenaming = false; + Debug.LogWarning( + $"[Rename Variables] The selected variable is an {unit.kind} variable inside an Asset. " + + $"{reference.rootObject.GetType().DisplayName()} does not have access to the scene this graph is used in." + ); + return; } - base.HandleInput(); - } - private bool IsSceneRequired() - { - return unit.kind == VariableKind.Object || unit.kind == VariableKind.Scene; - } + EditorGUI.FocusTextInControl(controlName); + string currentName = unit.defaultValues[unit.name.key] as string; - protected override NodeColorMix baseColor => NodeColorMix.TealReadable; + switch (unit.kind) + { + case VariableKind.Flow: + ActiveRenameTargets.Clear(); + ActiveRenameTargets.AddRange(GraphUtility.GetFlowVariablesRenameTargets(unit, currentName, reference)); + renameTargets.Clear(); + renameTargets.AddRange(ActiveRenameTargets.Select(t => (t, null))); + isRenaming = true; + break; - private VariableNameInspector nameInspector; - private Func nameInspectorConstructor; + case VariableKind.Graph: + ActiveRenameTargets.Clear(); + ActiveRenameTargets.AddRange(GraphUtility.GetGraphVariablesRenameTargets(graph as FlowGraph, currentName)); + renameTargets.Clear(); + renameTargets.AddRange(ActiveRenameTargets.Select(t => (t, null))); + isRenaming = true; + break; - public override Inspector GetPortInspector(IUnitPort port, Metadata metadata) - { - if (port == unit.name) - { - InspectorProvider.instance.Renew(ref nameInspector, metadata, nameInspectorConstructor); + case VariableKind.Object: + if (Flow.CanPredict(unit.@object, reference) && Flow.Predict(unit.@object, reference) is GameObject go) + { + renameTargets.Clear(); + renameTargets.AddRange(GraphUtility.GetObjectVariablesRenameTargets(reference, go, currentName)); + ActiveRenameTargets.Clear(); + ActiveRenameTargets.AddRange(renameTargets.Select(t => t.Item1)); + isRenaming = true; + } + break; - return nameInspector; + case VariableKind.Scene: + if (reference.scene != null && SceneVariables.InstantiatedIn(reference.scene.Value)) + { + renameTargets.Clear(); + renameTargets.AddRange(GraphUtility.GetSceneVariablesRenameTargets(reference, reference.scene, currentName)); + ActiveRenameTargets.Clear(); + ActiveRenameTargets.AddRange(renameTargets.Select(t => t.Item1)); + isRenaming = true; + } + break; + + default: + if (Application.isPlaying) + { + Debug.LogWarning($"[Rename Variables] Cannot rename all {unit.kind} variables while in play mode!"); + break; + } + isRenaming = true; + renameTargets.Clear(); + renameTargets.AddRange(GraphUtility.GetCurrentlyAccessibleProjectUnits(currentName, unit.kind)); + ActiveRenameTargets.Clear(); + ActiveRenameTargets.AddRange(renameTargets.Select(t => t.Item1)); + oldProjectName = currentName; + break; } + } - return base.GetPortInspector(port, metadata); + private bool ShouldEndRename() + { + return isRenaming && (!selection.Contains(unit) || + GUI.GetNameOfFocusedControl() != controlName || + e.keyCode == KeyCode.Return || + e.keyCode == KeyCode.Escape || + !canvas.isMouseOver); } - protected override IEnumerable contextOptions + private void ExecuteEndRename() { - get + isRenaming = false; + ActiveRenameTargets.Clear(); + + if (oldProjectName != null && newProjectName != null && oldProjectName != newProjectName) { - foreach (var option in base.contextOptions) + if (unit.kind == VariableKind.Application || unit.kind == VariableKind.Saved) { - yield return option; - } - - if (!unit.name.hasValidConnection && !Flow.CanPredict(unit.name, reference)) - yield break; + bool confirm = EditorUtility.DisplayDialog( + $"Update ALL {unit.kind} Variables?", + $"This will search ALL scenes and macros to update '{oldProjectName}' to '{newProjectName}'.\n\nThis operation is FINAL and cannot be undone!", + "Update All", + "Rename Only" + ); - yield return new DropdownOption((Action)FindAll, "Find/All"); - yield return new DropdownOption((Action)FindSetters, "Find/Setters"); - yield return new DropdownOption((Action)FindGetters, "Find/Getters"); + if (confirm) + { + if (unit.kind == VariableKind.Application) + GraphUtility.RenameApplicationVariables(oldProjectName, newProjectName); + else + GraphUtility.RenameSavedVariables(oldProjectName, newProjectName); + } + } } - } - private void FindAll() - { - var value = Flow.Predict(unit.name, reference); - if (value is string name) - NodeFinderWindow.Open($"{name} [SetVariable: {unit.kind}] | {name} [GetVariable: {unit.kind}]"); + oldProjectName = null; + newProjectName = null; } - private void FindSetters() - { - var value = Flow.Predict(unit.name, reference); - if (value is string name) - NodeFinderWindow.Open($"{name} [SetVariable: {unit.kind}]"); - } + private bool IsSceneRequired() => unit.kind == VariableKind.Object || unit.kind == VariableKind.Scene; + + #endregion + + #region Search Helpers + + private void FindAll() => OpenNodeFinder($"{{0}} [SetVariable: {unit.kind}] | {{0}} [GetVariable: {unit.kind}]"); + private void FindSetters() => OpenNodeFinder($"{{0}} [SetVariable: {unit.kind}]"); + private void FindGetters() => OpenNodeFinder($"{{0}} [GetVariable: {unit.kind}]"); - private void FindGetters() + private void OpenNodeFinder(string querySuffix) { - var value = Flow.Predict(unit.name, reference); - if (value is string name) - NodeFinderWindow.Open($"{name} [GetVariable: {unit.kind}]"); + if (Flow.Predict(unit.name, reference) is string varName) + { + NodeFinderWindow.Open(string.Format(querySuffix, varName)); + } } private IEnumerable GetNameSuggestions() { return EditorVariablesUtility.GetVariableNameSuggestions(unit.kind, reference); } + + #endregion } -} +} \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitConnectionWidget.cs b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitConnectionWidget.cs index 7d96d435..e68e4558 100644 --- a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitConnectionWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitConnectionWidget.cs @@ -166,9 +166,7 @@ protected virtual void DrawConnection() } } - var thickness = 3; - - GraphGUI.DrawConnection(color, sourceHandleEdgeCenter, destinationHandleEdgeCenter, Edge.Right, Edge.Left, null, Vector2.zero, UnitConnectionStyles.relativeBend, UnitConnectionStyles.minBend, thickness); + GraphGUI.DrawConnection(color, sourceHandleEdgeCenter, destinationHandleEdgeCenter, sourceEdge, destinationEdge, null, Vector2.zero, CommunityStyles.relativeBend, CommunityStyles.minBend, CommunityStyles.connectionThickness); } #endregion @@ -197,6 +195,9 @@ protected virtual void DrawConnection() #region Droplets + protected virtual Edge sourceEdge => Edge.Right; + protected virtual Edge destinationEdge => Edge.Left; + protected readonly List droplets = new List(); private float dropTime; @@ -230,8 +231,11 @@ protected virtual void DrawDroplets() else { var t = (droplet - handleAlignmentMargin) / (1 - 2 * handleAlignmentMargin); - - position = GraphGUI.GetPointOnConnection(t, sourceHandleEdgeCenter, destinationHandleEdgeCenter, Edge.Bottom, Edge.Top, UnitConnectionStyles.relativeBend, UnitConnectionStyles.minBend); +#if ENABLE_VERTICAL_FLOW + position = GraphGUI.GetPointOnConnection(t, sourceHandleEdgeCenter, destinationHandleEdgeCenter, sourceEdge, destinationEdge, CommunityStyles.relativeBend, CommunityStyles.minBend); +#else + position = GraphGUI.GetPointOnConnection(t, sourceHandleEdgeCenter, destinationHandleEdgeCenter, sourceEdge, destinationEdge, UnitConnectionStyles.relativeBend, UnitConnectionStyles.minBend); +#endif } var size = GetDropletSize(); diff --git a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitPortWidget.cs b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitPortWidget.cs index c151ccdd..11b23950 100644 --- a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitPortWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitPortWidget.cs @@ -292,6 +292,8 @@ public override Rect hotArea } } + protected virtual Vector2 HandleSize => Styles.handleSize; + public override void CachePosition() { var outside = edge.Normal().x; @@ -300,9 +302,9 @@ public override void CachePosition() var handlePosition = new Rect( x, - y + (EditorGUIUtility.singleLineHeight - Styles.handleSize.y + Styles.spaceBetweenEdgeAndHandle) / 2, - Styles.handleSize.x, - Styles.handleSize.y + y + (EditorGUIUtility.singleLineHeight - HandleSize.y + Styles.spaceBetweenEdgeAndHandle) / 2, + HandleSize.x, + HandleSize.y ); if (flip) handlePosition.x -= handlePosition.width; @@ -343,6 +345,21 @@ public override void CachePosition() this.labelPosition = labelPosition; } + var bounds = identifierPosition; + + if (bounds.width < 16f) + { + bounds.x -= (16f - bounds.width) / 2f; + bounds.width = 16f; + } + if (bounds.height < 16f) + { + bounds.y -= (16f - bounds.height) / 2f; + bounds.height = 16f; + } + + identifierPosition = bounds; + surroundPosition = Styles.surroundPadding.Add(identifierPosition); } @@ -450,6 +467,10 @@ public override float zIndex #region Drawing + protected virtual float connectionMinBend => CommunityStyles.minBend; + protected virtual float connectionrelativeBend => CommunityStyles.relativeBend; + protected virtual Edge connectionEndEdge => edge == Edge.Left ? Edge.Right : Edge.Left; + public override bool canClip => base.canClip && canvas.connectionSource != port; protected virtual bool showInspector => false; @@ -786,6 +807,8 @@ private void DrawInspector() } } + protected static readonly Vector2 PortalSize = new Vector2(16, 16); + protected virtual void DrawConnectionSource() { var start = handlePosition.GetEdgeCenter(edge); @@ -795,20 +818,27 @@ protected virtual void DrawConnectionSource() canvas.connectionEnd = mousePosition; } - float minBend = 20f; + Vector2 size = HandleSize; + Texture texture = handleTextureConnected; - GraphGUI.DrawConnection - ( - color, - start, - canvas.connectionEnd, - edge, - null, - handleTextureConnected, - Styles.handleSize, - UnitConnectionStyles.relativeBend, - minBend - ); + if (e.alt && this is ValueInputWidget or ValueOutputWidget) + { + size = PortalSize; + texture = CommunityStyles.valuePortalConnection; + } + + GraphGUI.DrawConnection( + color, + start, + canvas.connectionEnd, + edge, + connectionEndEdge, + texture, + size, + connectionrelativeBend, + connectionMinBend, + CommunityStyles.connectionThickness + ); } private void DrawSurround() diff --git a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitWidget.cs b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitWidget.cs deleted file mode 100644 index 078279d8..00000000 --- a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitWidget.cs +++ /dev/null @@ -1,2406 +0,0 @@ -#if NEW_UNIT_UI -using System; -using System.Collections.Generic; -using System.Linq; -using UnityEditor; -using UnityEngine; -using Unity.VisualScripting.Community.Libraries.Humility; -#if ENABLE_VERTICAL_FLOW -namespace Unity.VisualScripting.Community -{ - public class UnitWidget : NodeWidget, IUnitWidget where TUnit : class, IUnit - { - public UnitWidget(FlowCanvas canvas, TUnit unit) : base(canvas, unit) - { - unit.onPortsChanged += CacheDefinition; - unit.onPortsChanged += SubWidgetsChanged; - } - - public override void Dispose() - { - base.Dispose(); - - unit.onPortsChanged -= CacheDefinition; - unit.onPortsChanged -= SubWidgetsChanged; - } - - public override IEnumerable subWidgets => unit.ports.Select(port => canvas.Widget(port)); - - - #region Model - - protected TUnit unit => element; - - IUnit IUnitWidget.unit => unit; - - protected IUnitDebugData unitDebugData => GetDebugData(); - - private UnitDescription description; - - private UnitAnalysis analysis => unit.Analysis(context); - - protected readonly List ports = new List(); - - protected readonly List inputs = new List(); - - protected readonly List outputs = new List(); - - private readonly List settingNames = new List(); - - public override Rect hotArea => outerPosition; - - protected IEnumerable settings - { - get - { - foreach (var settingName in settingNames) - { - yield return metadata[settingName]; - } - } - } - - protected override void CacheItemFirstTime() - { - base.CacheItemFirstTime(); - CacheDefinition(); - } - - protected virtual void CacheDefinition() - { - inputs.Clear(); - outputs.Clear(); - ports.Clear(); - inputs.AddRange(unit.inputs.Select(port => canvas.Widget(port))); - outputs.AddRange(unit.outputs.Select(port => canvas.Widget(port))); - ports.AddRange(inputs); - ports.AddRange(outputs); - - Reposition(); - } - - protected override void CacheDescription() - { - description = unit.Description(); - - titleContent.text = description.shortTitle; - titleContent.tooltip = description.summary; - surtitleContent.text = description.surtitle; - subtitleContent.text = description.subtitle; - - Reposition(); - } - - protected override void CacheMetadata() - { - settingNames.Clear(); - - settingNames.AddRange(metadata.valueType - .GetMembers() - .Where(mi => mi.HasAttribute()) - .OrderBy(mi => mi.GetAttributes().OfType().FirstOrDefault()?.order ?? int.MaxValue) - .ThenBy(mi => mi.MetadataToken) - .Select(mi => mi.Name)); - - lock (settingLabelsContents) - { - settingLabelsContents.Clear(); - - foreach (var setting in settings) - { - var settingLabel = setting.GetAttribute().label; - - GUIContent settingContent; - - if (string.IsNullOrEmpty(settingLabel)) - { - settingContent = null; - } - else - { - settingContent = new GUIContent(settingLabel); - } - - settingLabelsContents.Add(setting, settingContent); - } - } - - Reposition(); - } - - public virtual Inspector GetPortInspector(IUnitPort port, Metadata metadata) - { - return metadata.Inspector(); - } - - #endregion - - - #region Lifecycle - - public override bool foregroundRequiresInput => showSettings || unit.valueInputs.Any(vip => vip.hasDefaultValue); - - public override void HandleInput() - { - if (isDragging && e.ctrlOrCmd) - { - List otherRects = graph.elements.Where(e => e != element && !(e is IUnitConnection)) - .Select(SnapTarget) - .ToList(); - - var snapResult = RectUtility.CheckSnap(outerPosition, otherRects, threshold: 15f); - - if (snapResult.snapped) - { - var pos = BoltCore.Configuration.snapToGrid ? GraphGUI.SnapToGrid(snapResult.snapPosition) : snapResult.snapPosition; - _position = OuterToEdgePosition(new Rect(pos.x, pos.y, _position.width, _position.height)); - snapLines = snapResult.snapLines; - Reposition(); - } - else - { - snapLines.Clear(); - } - } - - if (canvas.isCreatingConnection) - { - if (e.IsMouseDown(MouseButton.Left)) - { - var source = canvas.connectionSource; - var destination = source.CompatiblePort(unit); - - if (destination != null) - { - UndoUtility.RecordEditedObject("Connect Nodes"); - source.ValidlyConnectTo(destination); - canvas.connectionSource = null; - canvas.Widget(source.unit).Reposition(); - canvas.Widget(destination.unit).Reposition(); - GUI.changed = true; - } - - e.Use(); - } - else if (e.IsMouseDown(MouseButton.Right)) - { - canvas.CancelConnection(); - e.Use(); - } - } - - base.HandleInput(); - } - - private Rect SnapTarget(IGraphElement e) - { - if (e is Unit unit) - { - return canvas.Widget(unit).outerPosition; - } - return canvas.Widget(e).position; - } - - #endregion - - - #region Contents - - protected readonly GUIContent titleContent = new GUIContent(); - - protected readonly GUIContent surtitleContent = new GUIContent(); - - protected readonly GUIContent subtitleContent = new GUIContent(); - - protected readonly Dictionary settingLabelsContents = new Dictionary(); - - #endregion - - - #region Positioning - - protected override bool snapToGrid => BoltCore.Configuration.snapToGrid; - protected virtual bool isSpecialPortsColor => _isSpecialColor; - protected virtual Color? PortsbackgroundColor => null; - - public override IEnumerable positionDependers => ports.Cast(); - - protected Rect _position; - - public override Rect position - { - get { return _position; } - set { unit.position = value.position; } - } - - public Rect titlePosition { get; protected set; } - - public Rect surtitlePosition { get; protected set; } - - public Rect subtitlePosition { get; protected set; } - - public Rect iconPosition { get; protected set; } - - public List iconsPositions { get; protected set; } = new List(); - - public Dictionary settingsPositions { get; } = new Dictionary(); - - public Rect headerAddonPosition { get; protected set; } - - public Rect portsBackgroundPosition { get; protected set; } - - private bool _isSpecialColor; - - public override void CachePosition() - { - const float compactY = 0.5f; - const float compactX = 0.8f; - - // TODO: Make invalid control ports vertical. - var valueInputs = inputs - .Where(p => - p is ValueInputWidget || - p is InvalidInputWidget) - .Cast(); - - var valueOutputs = outputs - .Where(p => - p is ValueOutputWidget || - p is InvalidOutputWidget) - .Cast(); - - var controlInputs = inputs.OfType().ToList(); - var controlOutputs = outputs.OfType().ToList(); - - var valueInputsWidth = valueInputs.Any() ? valueInputs.Max(p => p.GetInnerWidth()) : 0f; - var outputsWidth = valueOutputs.Any() ? valueOutputs.Max(p => p.GetInnerWidth()) : 0f; - - var portsWidth = valueInputsWidth + Styles.spaceBetweenInputsAndOutputs + outputsWidth; - - const float spaceBetweenControlPorts = 10; - - portsWidth = Mathf.Max(portsWidth, (controlInputs.Any() ? Mathf.Min(90f, controlInputs.Max(p => p.GetInnerWidth()) + spaceBetweenControlPorts) : 0f) * controlInputs.Count); - portsWidth = Mathf.Max(portsWidth, (controlOutputs.Any() ? Mathf.Min(90f, controlOutputs.Max(p => p.GetInnerWidth()) + spaceBetweenControlPorts) : 0f) * controlOutputs.Count); - - settingsPositions.Clear(); - var settingsWidth = 0f; - - if (showSettings) - { - foreach (var setting in settings) - { - var settingLabelContent = settingLabelsContents[setting]; - var settingWidth = 0f; - - if (settingLabelContent != null) - settingWidth += Styles.settingLabel.CalcSize(settingLabelContent).x; - - settingWidth += setting.Inspector().GetAdaptiveWidth(); - settingWidth = Mathf.Min(settingWidth, Styles.maxSettingsWidth); - - settingsPositions.Add(setting, new Rect(0, 0, settingWidth, 0)); - settingsWidth = Mathf.Max(settingsWidth, settingWidth); - } - } - - var headerAddonWidth = showHeaderAddon ? GetHeaderAddonWidth() : 0f; - var titleWidth = Styles.title.CalcSize(titleContent).x; - var headerTextWidth = titleWidth; - - if (showSurtitle) - headerTextWidth = Mathf.Max(headerTextWidth, Styles.surtitle.CalcSize(surtitleContent).x); - if (showSubtitle) - headerTextWidth = Mathf.Max(headerTextWidth, Styles.subtitle.CalcSize(subtitleContent).x); - - var iconsWidth = 0f; - if (showIcons) - { - var iconsColumns = Mathf.Ceil((float)description.icons.Length / Styles.iconsPerColumn); - iconsWidth = iconsColumns * Styles.iconsSize + ((iconsColumns - 1) * Styles.iconsSpacing * compactX); - } - - var headerWidth = Mathf.Max(headerTextWidth + iconsWidth, - Mathf.Max(settingsWidth, headerAddonWidth)) + Styles.iconSize + (Styles.spaceAfterIcon * compactX); - - var innerWidth = Mathf.Max(portsWidth, headerWidth); - var edgeWidth = InnerToEdgePosition(new Rect(0, 0, innerWidth, 0)).width; - - var edgeOrigin = unit.position; - var edgeX = edgeOrigin.x; - var edgeY = edgeOrigin.y; - - var innerOrigin = EdgeToInnerPosition(new Rect(edgeOrigin, Vector2.zero)).position; - var innerX = innerOrigin.x; - var innerY = innerOrigin.y; - - var y = innerY; - var headerHeight = 0f; - -#if NEW_UNIT_STYLE - var controlInputsHeight = controlInputs.Any(c => c.showLabel) ? controlInputs.Max(p => p.GetHeight()) : 0f; -#else - var controlInputsHeight = controlInputs.Any(c => c.showLabel) ? controlInputs.Max(p => p.GetHeight()) + 4 : 0f; -#endif - headerHeight += controlInputsHeight; - y += controlInputsHeight; - - iconPosition = new Rect(innerX, y, Styles.iconSize, Styles.iconSize); - var headerTextX = iconPosition.xMax + Styles.spaceAfterIcon * compactX; - - if (showSurtitle) - { - var h = Styles.surtitle.CalcHeight(surtitleContent, headerTextWidth); - surtitlePosition = new Rect(headerTextX, y, headerTextWidth, h); - headerHeight += h + Styles.spaceAfterSurtitle * compactY; - y += h + Styles.spaceAfterSurtitle * compactY; - } - - if (showTitle) - { - var h = Styles.title.CalcHeight(titleContent, headerTextWidth); - titlePosition = new Rect(headerTextX, y, headerTextWidth, h); - headerHeight += h; - y += h; - } - - if (showSubtitle) - { - headerHeight += Styles.spaceBeforeSubtitle * compactY; - y += Styles.spaceBeforeSubtitle * compactY; - - var h = Styles.subtitle.CalcHeight(subtitleContent, headerTextWidth); - subtitlePosition = new Rect(headerTextX, y, headerTextWidth, h); - headerHeight += h; - y += h; - } - - iconsPositions.Clear(); - - if (showIcons) - { - var iconRow = 0; - var iconCol = 0; - - for (int i = 0; i < description.icons.Length; i++) - { - var iconPosition = new Rect - ( - innerX + innerWidth - ((iconCol + 1) * Styles.iconsSize) - ((iconCol) * Styles.iconsSpacing), - innerY + (iconRow * (Styles.iconsSize + Styles.iconsSpacing)), - Styles.iconsSize, - Styles.iconsSize - ); - - iconsPositions.Add(iconPosition); - - iconRow++; - - if (iconRow % Styles.iconsPerColumn == 0) - { - iconCol++; - iconRow = 0; - } - } - } - - if (showSettings) - { - headerHeight += Styles.spaceBeforeSettings * compactY; - y += Styles.spaceBeforeSettings * compactY; - var last = settings.Last(); - foreach (var setting in settings) - { - var settingWidth = settingsPositions[setting].width; - using (LudiqGUIUtility.currentInspectorWidth.Override(settingWidth)) - { - var settingHeight = LudiqGUI.GetInspectorHeight(null, setting, settingWidth, settingLabelsContents[setting] ?? GUIContent.none); - settingsPositions[setting] = new Rect(headerTextX, y, settingWidth, settingHeight); - if (setting != last) - { - y += settingHeight + Styles.spaceBetweenSettings; - headerHeight += settingHeight + Styles.spaceBetweenSettings; - } - else - { - y += settingHeight - Styles.spaceBetweenSettings; - headerHeight += settingHeight - Styles.spaceBetweenSettings; - } - } - } - } - - if (showHeaderAddon) - { - var addonHeight = GetHeaderAddonHeight(headerAddonWidth); - headerAddonPosition = new Rect(headerTextX, y, headerAddonWidth, addonHeight); - y += addonHeight; - headerHeight += addonHeight; - } - - headerHeight = Mathf.Max(headerHeight, Styles.iconSize * 0.7f); - - y = innerY + headerHeight + Styles.spaceBeforePorts; - var innerHeight = headerHeight; - - var controlOutputsHeight = 0f; - if (showPorts) - { - bool hasValuePorts = ports.Any(p => p.port is ValueInput or ValueOutput or InvalidInput or InvalidOutput); - - if (hasValuePorts) - { - innerHeight += Styles.spaceBeforePorts * compactY; - y += Styles.spaceBeforePorts * compactY; - } - - float portsBackgroundY = y; - float portsBackgroundHeight = hasValuePorts ? Styles.portsBackground.padding.top * compactY : 0f; - y += portsBackgroundHeight; - - var portStartY = y; - - float inputsHeight = 0f; - foreach (var input in inputs) - { - if (input is ControlInputWidget) continue; - float h = input.GetHeight(); - input.y = y; - y += h + Styles.spaceBetweenPorts * compactY; - inputsHeight += h + Styles.spaceBetweenPorts * compactY; - } - - float outputsHeight = 0f; - foreach (var output in outputs) - { - if (output is ControlOutputWidget) continue; - float h = output.GetHeight(); - output.y = portStartY + outputsHeight; - outputsHeight += h + Styles.spaceBetweenPorts * compactY; - } - - float portsHeight = Mathf.Max(inputsHeight, outputsHeight); - if (hasValuePorts) - { - portsBackgroundHeight += portsHeight + Styles.portsBackground.padding.bottom * compactY; - innerHeight += portsHeight + Styles.portsBackground.padding.bottom * compactY; - } - - if (controlInputs.Count > 0) - { - int portCount = controlInputs.Count; - - float controlY = edgeY - Styles.spaceBeforePorts - Styles.spaceAfterControlInputs; - - float totalSlotSpace = OuterToEdgePosition(new Rect(edgeX, portsBackgroundY, edgeWidth, portsBackgroundHeight)).width - Styles.spaceBeforePorts; - float slotWidth = totalSlotSpace / portCount; - - for (int i = 0; i < portCount; i++) - { - var widget = controlInputs[i]; - float slotCenter = edgeX + (slotWidth * (i + 0.5f)); - widget.x = slotCenter; - widget.y = controlY; - } - } - - if (controlOutputs.Count > 0) - { - int portCount = controlOutputs.Count; - - float maxHeight = 0f; - foreach (var widget in controlOutputs) - { - maxHeight = Mathf.Max(maxHeight, widget.GetHeight()); - } - - controlOutputsHeight = maxHeight + 3; - - float controlY = innerY + innerHeight + Styles.spaceBeforePorts + controlOutputsHeight + Styles.spaceBeforeControlOutputs; - - float totalSlotSpace = OuterToEdgePosition(new Rect(edgeX, portsBackgroundY, edgeWidth, portsBackgroundHeight)).width - Styles.spaceBeforePorts; - float slotWidth = totalSlotSpace / portCount; - - for (int i = 0; i < portCount; i++) - { - var widget = controlOutputs[i]; - float slotCenter = edgeX + (slotWidth * (i + 0.5f)); - widget.x = slotCenter; - widget.y = controlY; - } - } - portsBackgroundPosition = new Rect(edgeX, portsBackgroundY, edgeWidth, portsBackgroundHeight); - } - - var edgeHeight = InnerToEdgePosition(new Rect(0, 0, 0, innerHeight)).height; - _position = new Rect(edgeX, edgeY, edgeWidth, edgeHeight + controlOutputsHeight); - } - - protected virtual float GetHeaderAddonWidth() - { - return 0; - } - - protected virtual float GetHeaderAddonHeight(float width) - { - return 0; - } - - #endregion - - - #region Drawing - private List snapLines = new List(); - - protected void DrawSnapLines() - { - if (snapLines == null || snapLines.Count == 0) - return; - - Handles.color = new Color32(64, 113, 156, 255); - foreach (var line in snapLines) - { - Handles.DrawLine(line.start, line.end); - } - } - - protected virtual NodeColorMix baseColor => NodeColor.Gray; - - protected override NodeColorMix color - { - get - { - _isSpecialColor = false; - - if (unitDebugData.runtimeException != null) - { - return NodeColor.Red; - } - - var color = baseColor; - - if (analysis.warnings.Count > 0) - { - var mostSevereWarning = Warning.MostSevereLevel(analysis.warnings); - - switch (mostSevereWarning) - { - case WarningLevel.Error: - color = NodeColor.Red; - _isSpecialColor = true; - break; - - case WarningLevel.Severe: - color = NodeColor.Orange; - _isSpecialColor = true; - break; - - case WarningLevel.Caution: - color = NodeColor.Yellow; - - break; - } - } - - if (EditorApplication.isPaused) - { - if (EditorTimeBinding.frame == unitDebugData.lastInvokeFrame) - { - return NodeColor.Blue; - } - } - else - { - var mix = color; - mix.blue = Mathf.Lerp(1, 0, (EditorTimeBinding.time - unitDebugData.lastInvokeTime) / Styles.invokeFadeDuration); - - return mix; - } - - return color; - } - } - - protected override NodeShape shape => NodeShape.Square; - - protected virtual bool showTitle => !string.IsNullOrEmpty(description.shortTitle); - - protected virtual bool showSurtitle => !string.IsNullOrEmpty(description.surtitle); - - protected virtual bool showSubtitle => !string.IsNullOrEmpty(description.subtitle); - - protected virtual bool showIcons => description.icons.Length > 0; - - protected virtual bool showSettings => settingNames.Count > 0; - - protected virtual bool showHeaderAddon => false; - - protected virtual bool showPorts => ports.Count > 0; - - protected override bool dim - { - get - { - var dim = BoltCore.Configuration.dimInactiveNodes && !analysis.isEntered; - - if (isMouseOver || isSelected) - { - dim = false; - } - - if (BoltCore.Configuration.dimIncompatibleNodes && canvas.isCreatingConnection) - { - dim = !unit.ports.Any(p => canvas.connectionSource == p || canvas.connectionSource.CanValidlyConnectTo(p)); - } - - return dim; - } - } - public override void DrawOverlay() - { - base.DrawOverlay(); - if (isDragging && e.ctrlOrCmd) - DrawSnapLines(); - } - public override void DrawForeground() - { - BeginDim(); - - base.DrawForeground(); - - DrawIcon(); - - if (showSurtitle) - { - DrawSurtitle(); - } - - if (showTitle) - { - DrawTitle(); - } - - if (showSubtitle) - { - DrawSubtitle(); - } - - if (showIcons) - { - DrawIcons(); - } - - if (showSettings) - { - DrawSettings(); - } - - if (showHeaderAddon) - { - DrawHeaderAddon(); - } - - if (showPorts) - { - DrawPortsBackground(); - } - - EndDim(); - } - - protected void DrawIcon() - { - var icon = description.icon ?? BoltFlow.Icons.unit; - - if (icon != null && icon[(int)iconPosition.width]) - { - GUI.DrawTexture(iconPosition, icon[(int)iconPosition.width]); - } - } - - protected void DrawTitle() - { - GUI.Label(titlePosition, titleContent, invertForeground ? Styles.titleInverted : Styles.title); - } - - protected void DrawSurtitle() - { - GUI.Label(surtitlePosition, surtitleContent, invertForeground ? Styles.surtitleInverted : Styles.surtitle); - } - - protected void DrawSubtitle() - { - GUI.Label(subtitlePosition, subtitleContent, invertForeground ? Styles.subtitleInverted : Styles.subtitle); - } - - protected void DrawIcons() - { - for (int i = 0; i < description.icons.Length; i++) - { - var icon = description.icons[i]; - var position = iconsPositions[i]; - - GUI.DrawTexture(position, icon?[(int)position.width]); - } - } - - private void DrawSettings() - { - if (graph.zoom < FlowCanvas.inspectorZoomThreshold) - { - return; - } - - EditorGUI.BeginDisabledGroup(!e.IsRepaint && isMouseThrough && !isMouseOver); - - EditorGUI.BeginChangeCheck(); - - foreach (var setting in settings) - { - DrawSetting(setting); - } - - if (EditorGUI.EndChangeCheck()) - { - unit.Define(); - Reposition(); - } - - EditorGUI.EndDisabledGroup(); - } - - protected void DrawSetting(Metadata setting) - { - var settingPosition = settingsPositions[setting]; - - using (LudiqGUIUtility.currentInspectorWidth.Override(settingPosition.width)) - using (Inspector.expandTooltip.Override(false)) - { - var label = settingLabelsContents[setting]; - - if (label == null) - { - LudiqGUI.Inspector(setting, settingPosition, GUIContent.none); - } - else - { - using (Inspector.defaultLabelStyle.Override(Styles.settingLabel)) - using (LudiqGUIUtility.labelWidth.Override(Styles.settingLabel.CalcSize(label).x)) - { - LudiqGUI.Inspector(setting, settingPosition, label); - } - } - } - } - - protected virtual void DrawHeaderAddon() { } - - protected void DrawPortsBackground() - { - if (canvas.showRelations) - { - foreach (var relation in unit.relations) - { - var sourcePort = relation.source; - var destinationPort = relation.destination; - - var sourceWidget = ports.Single(pw => pw.port == sourcePort); - var destinationWidget = ports.Single(pw => pw.port == destinationPort); - - Vector2 start = sourceWidget.handlePosition.center; - Vector2 end = destinationWidget.handlePosition.center; - - bool valueToControl = - sourcePort is ValueInput && - destinationPort is ControlInput; - - // Requirement - if (valueToControl) - { - start = sourceWidget.handlePosition.center; - - end = new Vector2( - destinationWidget.handlePosition.center.x, - destinationWidget.handlePosition.yMin - ); - } - - float distance = Vector2.Distance(start, end); - float offset = Mathf.Min(distance * 0.35f, 40f); - - Vector2 startDir; - Vector2 endDir; - - if (valueToControl) - { - startDir = Vector2.up; - endDir = Vector2.down; - } - else - { - startDir = PortDirection(sourcePort); - endDir = PortDirection(destinationPort); - } - - Vector2 startTangent = start + startDir * offset; - Vector2 endTangent = end + endDir * offset; - - Handles.DrawBezier( - start, - end, - startTangent, - endTangent, - ColorPalette.unityBackgroundMid, - null, - 3f - ); - } - - static Vector2 PortDirection(IUnitPort port) - { - return port switch - { - ControlOutput => Vector2.down, - ControlInput => Vector2.up, - - ValueOutput => Vector2.left, - ValueInput => Vector2.right, - - _ => Vector2.right - }; - } - } - else - { - if (e.IsRepaint && ports.Count(p => p.port is ValueInput or ValueOutput) > 0) - { -#if NEW_UNIT_STYLE - var previous = GUI.backgroundColor; - - if (isSpecialPortsColor) - { - GUI.backgroundColor = PortsbackgroundColor ?? ToColor(color); - } - - Styles.portsBackground.Draw(portsBackgroundPosition, false, false, false, false); - - if (isSpecialPortsColor) - GUI.backgroundColor = previous; -#else - Styles.portsBackground.Draw(portsBackgroundPosition, false, false, false, false); -#endif - } - } - } - - private readonly Dictionary colorMap = new Dictionary() - { - { NodeColor.Gray, new Color(0.5f, 0.5f, 0.5f) }, - { NodeColor.Blue, new Color(0.25f, 0.6f, 1f) }, - { NodeColor.Teal, new Color(0f, 0.75f, 0.75f) }, - { NodeColor.Green, new Color(0.4f, 0.8f, 0.4f) }, - { NodeColor.Yellow, new Color(1f, 0.9f, 0.2f) }, - { NodeColor.Orange, new Color(1f, 0.6f, 0.2f) }, - { NodeColor.Red, new Color(1f, 0.3f, 0.3f) } - }; - - public Color ToColor(NodeColorMix mix) - { - mix = mix.normalized; - Color result = Color.black; - foreach (var kvp in mix) - if (colorMap.TryGetValue(kvp.Key, out var c)) - result += c * kvp.Value; - - result.r = Mathf.Clamp01(result.r); - result.g = Mathf.Clamp01(result.g); - result.b = Mathf.Clamp01(result.b); - result.a = 1f; - return result; - } - - #endregion - - - #region Selecting - - public override bool canSelect => true; - - #endregion - - - #region Dragging - - public override bool canDrag => true; - - public override void ExpandDragGroup(HashSet dragGroup) - { - if (BoltCore.Configuration.carryChildren) - { - foreach (var output in unit.outputs) - { - foreach (var connection in output.connections) - { - if (dragGroup.Contains(connection.destination.unit)) - { - continue; - } - - dragGroup.Add(connection.destination.unit); - - canvas.Widget(connection.destination.unit).ExpandDragGroup(dragGroup); - } - } - } - } - - #endregion - - - #region Deleting - - public override bool canDelete => true; - - #endregion - - - #region Clipboard - - public override void ExpandCopyGroup(HashSet copyGroup) - { - copyGroup.UnionWith(unit.connections.Cast()); - } - - #endregion - - - #region Context - - protected override IEnumerable contextOptions - { - get - { - yield return new DropdownOption((Action)ReplaceUnit, "Replace..."); - - foreach (var baseOption in base.contextOptions) - { - yield return baseOption; - } - - if (selection.Count > 0) - { - yield return new DropdownOption((Action)ConvertToEmbed, "Selection/To Embed Subgraph"); - yield return new DropdownOption((Action)ConvertToMacro, "Selection/To Macro Subgraph"); - } - } - } - - private void ConvertToEmbed() - { - NodeSelection.Convert(GraphSource.Embed); - } - - private void ConvertToMacro() - { - NodeSelection.Convert(GraphSource.Macro); - } - - private void ReplaceUnit() - { - UnitWidgetHelper.ReplaceUnit(unit, reference, context, selection, e); - } - - #endregion - - - public static class Styles - { - static Styles() - { - // Disabling word wrap because Unity's CalcSize and CalcHeight - // are broken w.r.t. pixel-perfection and matrix - - title = new GUIStyle(BoltCore.Styles.nodeLabel); - title.padding = new RectOffset(0, 5, 0, 2); - title.margin = new RectOffset(0, 0, 0, 0); - title.fontSize = 12; - title.alignment = TextAnchor.MiddleLeft; - title.wordWrap = false; - - surtitle = new GUIStyle(BoltCore.Styles.nodeLabel); - surtitle.padding = new RectOffset(0, 5, 0, 0); - surtitle.margin = new RectOffset(0, 0, 0, 0); - surtitle.fontSize = 10; - surtitle.alignment = TextAnchor.MiddleLeft; - surtitle.wordWrap = false; - - subtitle = new GUIStyle(surtitle); - subtitle.padding.bottom = 2; - - titleInverted = new GUIStyle(title); - titleInverted.normal.textColor = ColorPalette.unityBackgroundDark; - - surtitleInverted = new GUIStyle(surtitle); - surtitleInverted.normal.textColor = ColorPalette.unityBackgroundDark; - - subtitleInverted = new GUIStyle(subtitle); - subtitleInverted.normal.textColor = ColorPalette.unityBackgroundDark; - -#if NEW_UNIT_STYLE - if (EditorGUIUtility.isProSkin) - { - portsBackground = new GUIStyle - { - padding = new RectOffset(0, 0, 6, 5), - border = new RectOffset(0, 0, 2, 2) - }; - - portsBackground.normal.background = CommunityStyles.MakeBorderedTexture(CommunityStyles.backgroundColor, CommunityStyles.backgroundColor.Darken(0.05f)); - } - else - { - portsBackground = new GUIStyle - { - normal = { background = CommunityStyles.MakeBorderedTexture(CommunityStyles.backgroundColor, CommunityStyles.backgroundColor.Brighten(0.05f)) }, - padding = new RectOffset(0, 0, 6, 5) - }; - } -#else - portsBackground = VisualScripting.UnitWidget.Styles.portsBackground; -#endif - settingLabel = new GUIStyle(BoltCore.Styles.nodeLabel); - settingLabel.padding.left = 0; - settingLabel.padding.right = 5; - settingLabel.wordWrap = false; - settingLabel.clipping = TextClipping.Clip; - } - - public static readonly GUIStyle title; - - public static readonly GUIStyle surtitle; - - public static readonly GUIStyle subtitle; - - public static readonly GUIStyle titleInverted; - - public static readonly GUIStyle surtitleInverted; - - public static readonly GUIStyle subtitleInverted; - - public static readonly GUIStyle settingLabel; - - public static readonly float spaceAroundLineIcon = 5; - - public static readonly float spaceBeforePorts = 8; -#if NEW_UNIT_STYLE - public static readonly float spaceBeforeControlOutputs = 6; - - public static readonly float spaceAfterControlInputs = 20; -#else - public static readonly float spaceBeforeControlOutputs = 5; - public static readonly float spaceAfterControlInputs = 17; -#endif - public static readonly float spaceBetweenInputsAndOutputs = 8; - - public static readonly float spaceBeforeSettings = 2; - - public static readonly float spaceBetweenSettings = 3; - - public static readonly float spaceBetweenPorts = 3; - - public static readonly float spaceAfterSettings = 0; - - public static readonly float maxSettingsWidth = 150; - - public static readonly GUIStyle portsBackground; - - public static readonly float iconSize = 24f; - - public static readonly float iconsSize = IconSize.Small; - - public static readonly float iconsSpacing = 3; - - public static readonly int iconsPerColumn = 2; - - public static readonly float spaceAfterIcon = 3; - - public static readonly float spaceAfterSurtitle = 1; - - public static readonly float spaceBeforeSubtitle = 0; - - public static readonly float invokeFadeDuration = 0.5f; - } - } - - internal class UnitWidgetHelper - { - internal static void ReplaceUnit(IUnit unit, GraphReference reference, IGraphContext context, GraphSelection selection, EventWrapper eventWrapper) - { - var oldUnit = unit; - var unitPosition = oldUnit.position; - var preservation = UnitPreservation.Preserve(oldUnit); - - var options = new UnitOptionTree(new GUIContent("Node")); - options.filter = UnitOptionFilter.Any; -#if VISUAL_SCRIPTING_1_8_0_OR_GREATER - options.filter.NoConnection = false; -#endif - options.reference = reference; - - var activatorPosition = new Rect(eventWrapper.mousePosition, new Vector2(200, 1)); - - LudiqGUI.FuzzyDropdown - ( - activatorPosition, - options, - null, - delegate (object _option) - { - var option = (IUnitOption)_option; - - context.BeginEdit(); - UndoUtility.RecordEditedObject("Replace Node"); - var graph = oldUnit.graph; - oldUnit.graph.units.Remove(oldUnit); - var newUnit = option.InstantiateUnit(); - newUnit.guid = Guid.NewGuid(); - newUnit.position = unitPosition; - graph.units.Add(newUnit); - preservation.RestoreTo(newUnit); - option.PreconfigureUnit(newUnit); - selection.Select(newUnit); - GUI.changed = true; - context.EndEdit(); - } - ); - } - } -} -#else -namespace Unity.VisualScripting.Community -{ - public class UnitWidget : NodeWidget, IUnitWidget where TUnit : class, IUnit - { - public UnitWidget(FlowCanvas canvas, TUnit unit) : base(canvas, unit) - { - unit.onPortsChanged += CacheDefinition; - unit.onPortsChanged += SubWidgetsChanged; - } - - public override void Dispose() - { - base.Dispose(); - - unit.onPortsChanged -= CacheDefinition; - unit.onPortsChanged -= SubWidgetsChanged; - } - - public override IEnumerable subWidgets => unit.ports.Select(port => canvas.Widget(port)); - - - #region Model - - protected TUnit unit => element; - - IUnit IUnitWidget.unit => unit; - - protected IUnitDebugData unitDebugData => GetDebugData(); - - private UnitDescription description; - - private UnitAnalysis analysis => unit.Analysis(context); - - protected readonly List ports = new List(); - - protected readonly List inputs = new List(); - - protected readonly List outputs = new List(); - - private readonly List settingNames = new List(); - - protected IEnumerable settings - { - get - { - foreach (var settingName in settingNames) - { - yield return metadata[settingName]; - } - } - } - - protected override void CacheItemFirstTime() - { - base.CacheItemFirstTime(); - CacheDefinition(); - } - - protected virtual void CacheDefinition() - { - inputs.Clear(); - outputs.Clear(); - ports.Clear(); - inputs.AddRange(unit.inputs.Select(port => canvas.Widget(port))); - outputs.AddRange(unit.outputs.Select(port => canvas.Widget(port))); - ports.AddRange(inputs); - ports.AddRange(outputs); - - Reposition(); - } - - protected override void CacheDescription() - { - description = unit.Description(); - - titleContent.text = description.shortTitle; - titleContent.tooltip = description.summary; - surtitleContent.text = description.surtitle; - subtitleContent.text = description.subtitle; - - Reposition(); - } - - protected override void CacheMetadata() - { - settingNames.Clear(); - - settingNames.AddRange(metadata.valueType - .GetMembers() - .Where(mi => mi.HasAttribute()) - .OrderBy(mi => mi.GetAttributes().OfType().FirstOrDefault()?.order ?? int.MaxValue) - .ThenBy(mi => mi.MetadataToken) - .Select(mi => mi.Name)); - - lock (settingLabelsContents) - { - settingLabelsContents.Clear(); - - foreach (var setting in settings) - { - var settingLabel = setting.GetAttribute().label; - - GUIContent settingContent; - - if (string.IsNullOrEmpty(settingLabel)) - { - settingContent = null; - } - else - { - settingContent = new GUIContent(settingLabel); - } - - settingLabelsContents.Add(setting, settingContent); - } - } - - Reposition(); - } - - public virtual Inspector GetPortInspector(IUnitPort port, Metadata metadata) - { - return metadata.Inspector(); - } - - #endregion - - - #region Lifecycle - - public override bool foregroundRequiresInput => showSettings || unit.valueInputs.Any(vip => vip.hasDefaultValue); - - public override void HandleInput() - { - if (isDragging && e.ctrlOrCmd) - { - List otherRects = graph.elements.Where(e => e != element && !(e is IUnitConnection)) - .Select(SnapTarget) - .ToList(); - - var snapResult = RectUtility.CheckSnap(outerPosition, otherRects, threshold: 15f); - - if (snapResult.snapped) - { - var pos = BoltCore.Configuration.snapToGrid ? GraphGUI.SnapToGrid(snapResult.snapPosition) : snapResult.snapPosition; - _position = OuterToEdgePosition(new Rect(pos.x, pos.y, _position.width, _position.height)); - snapLines = snapResult.snapLines; - Reposition(); - } - else - { - snapLines.Clear(); - } - } - - if (canvas.isCreatingConnection) - { - if (e.IsMouseDown(MouseButton.Left)) - { - var source = canvas.connectionSource; - var destination = source.CompatiblePort(unit); - - if (destination != null) - { - UndoUtility.RecordEditedObject("Connect Nodes"); - source.ValidlyConnectTo(destination); - canvas.connectionSource = null; - canvas.Widget(source.unit).Reposition(); - canvas.Widget(destination.unit).Reposition(); - GUI.changed = true; - } - - e.Use(); - } - else if (e.IsMouseDown(MouseButton.Right)) - { - canvas.CancelConnection(); - e.Use(); - } - } - - base.HandleInput(); - } - - private Rect SnapTarget(IGraphElement e) - { - if (e is Unit unit) - { - return canvas.Widget(unit).outerPosition; - } - return canvas.Widget(e).position; - } - - #endregion - - - #region Contents - - protected readonly GUIContent titleContent = new GUIContent(); - - protected readonly GUIContent surtitleContent = new GUIContent(); - - protected readonly GUIContent subtitleContent = new GUIContent(); - - protected readonly Dictionary settingLabelsContents = new Dictionary(); - - #endregion - - - #region Positioning - - protected override bool snapToGrid => BoltCore.Configuration.snapToGrid; - - protected virtual bool isSpecialPortsColor => _isSpecialColor; - protected virtual Color? PortsbackgroundColor => null; - - public override IEnumerable positionDependers => ports.Cast(); - - protected Rect _position; - - public override Rect position - { - get { return _position; } - set { unit.position = value.position; } - } - - public Rect titlePosition { get; protected set; } - - public Rect surtitlePosition { get; protected set; } - - public Rect subtitlePosition { get; protected set; } - - public Rect iconPosition { get; protected set; } - - public List iconsPositions { get; protected set; } = new List(); - - public Dictionary settingsPositions { get; } = new Dictionary(); - - public Rect headerAddonPosition { get; protected set; } - - public Rect portsBackgroundPosition { get; protected set; } - - private bool _isSpecialColor; - - public override void CachePosition() - { - var inputsWidth = 0f; - var outputsWidth = 0f; - - foreach (var input in inputs) - { - inputsWidth = Mathf.Max(inputsWidth, input.GetInnerWidth()); - } - - foreach (var output in outputs) - { - outputsWidth = Mathf.Max(outputsWidth, output.GetInnerWidth()); - } - - var portsWidth = 0f; - - portsWidth += inputsWidth; - portsWidth += Styles.spaceBetweenInputsAndOutputs; - portsWidth += outputsWidth; - - settingsPositions.Clear(); - - var settingsWidth = 0f; - - if (showSettings) - { - foreach (var setting in settings) - { - var settingWidth = 0f; - - var settingLabelContent = settingLabelsContents[setting]; - - if (settingLabelContent != null) - { - settingWidth += Styles.settingLabel.CalcSize(settingLabelContent).x; - } - - settingWidth += setting.Inspector().GetAdaptiveWidth(); - - settingWidth = Mathf.Min(settingWidth, Styles.maxSettingsWidth); - - settingsPositions.Add(setting, new Rect(0, 0, settingWidth, 0)); - - settingsWidth = Mathf.Max(settingsWidth, settingWidth); - } - } - - var headerAddonWidth = 0f; - - if (showHeaderAddon) - { - headerAddonWidth = GetHeaderAddonWidth(); - } - - var titleWidth = Styles.title.CalcSize(titleContent).x; - - var headerTextWidth = titleWidth; - - var surtitleWidth = 0f; - - if (showSurtitle) - { - surtitleWidth = Styles.surtitle.CalcSize(surtitleContent).x; - headerTextWidth = Mathf.Max(headerTextWidth, surtitleWidth); - } - - var subtitleWidth = 0f; - - if (showSubtitle) - { - subtitleWidth = Styles.subtitle.CalcSize(subtitleContent).x; - headerTextWidth = Mathf.Max(headerTextWidth, subtitleWidth); - } - - var iconsWidth = 0f; - - if (showIcons) - { - var iconsColumns = Mathf.Ceil((float)description.icons.Length / Styles.iconsPerColumn); - iconsWidth = iconsColumns * Styles.iconsSize + ((iconsColumns - 1) * Styles.iconsSpacing); - } - - var headerWidth = Mathf.Max(headerTextWidth + iconsWidth, Mathf.Max(settingsWidth, headerAddonWidth)) + Styles.iconSize + Styles.spaceAfterIcon; - - var innerWidth = Mathf.Max(portsWidth, headerWidth); - - var edgeWidth = InnerToEdgePosition(new Rect(0, 0, innerWidth, 0)).width; - - var edgeOrigin = unit.position; - var edgeX = edgeOrigin.x; - var edgeY = edgeOrigin.y; - var innerOrigin = EdgeToInnerPosition(new Rect(edgeOrigin, Vector2.zero)).position; - var innerX = innerOrigin.x; - var innerY = innerOrigin.y; - - iconPosition = new Rect - ( - innerX, - innerY, - Styles.iconSize, - Styles.iconSize - ); - - var headerTextX = iconPosition.xMax + Styles.spaceAfterIcon; - - var y = innerY; - - var headerHeight = 0f; - - var surtitleHeight = 0f; - - if (showSurtitle) - { - surtitleHeight = Styles.surtitle.CalcHeight(surtitleContent, headerTextWidth); - - surtitlePosition = new Rect - ( - headerTextX, - y, - headerTextWidth, - surtitleHeight - ); - - headerHeight += surtitleHeight; - y += surtitleHeight; - - headerHeight += Styles.spaceAfterSurtitle; - y += Styles.spaceAfterSurtitle; - } - - var titleHeight = 0f; - - if (showTitle) - { - titleHeight = Styles.title.CalcHeight(titleContent, headerTextWidth); - - titlePosition = new Rect - ( - headerTextX, - y, - headerTextWidth, - titleHeight - ); - - headerHeight += titleHeight; - y += titleHeight; - } - - var subtitleHeight = 0f; - - if (showSubtitle) - { - headerHeight += Styles.spaceBeforeSubtitle; - y += Styles.spaceBeforeSubtitle; - - subtitleHeight = Styles.subtitle.CalcHeight(subtitleContent, headerTextWidth); - - subtitlePosition = new Rect - ( - headerTextX, - y, - headerTextWidth, - subtitleHeight - ); - - headerHeight += subtitleHeight; - y += subtitleHeight; - } - - iconsPositions.Clear(); - - if (showIcons) - { - var iconRow = 0; - var iconCol = 0; - - for (int i = 0; i < description.icons.Length; i++) - { - var iconPosition = new Rect - ( - innerX + innerWidth - ((iconCol + 1) * Styles.iconsSize) - ((iconCol) * Styles.iconsSpacing), - innerY + (iconRow * (Styles.iconsSize + Styles.iconsSpacing)), - Styles.iconsSize, - Styles.iconsSize - ); - - iconsPositions.Add(iconPosition); - - iconRow++; - - if (iconRow % Styles.iconsPerColumn == 0) - { - iconCol++; - iconRow = 0; - } - } - } - - var settingsHeight = 0f; - - if (showSettings) - { - headerHeight += Styles.spaceBeforeSettings; - - foreach (var setting in settings) - { - var settingWidth = settingsPositions[setting].width; - - using (LudiqGUIUtility.currentInspectorWidth.Override(settingWidth)) - { - var settingHeight = LudiqGUI.GetInspectorHeight(null, setting, settingWidth, settingLabelsContents[setting] ?? GUIContent.none); - - var settingPosition = new Rect - ( - headerTextX, - y, - settingWidth, - settingHeight - ); - - settingsPositions[setting] = settingPosition; - - settingsHeight += settingHeight; - y += settingHeight; - - settingsHeight += Styles.spaceBetweenSettings; - y += Styles.spaceBetweenSettings; - } - } - - settingsHeight -= Styles.spaceBetweenSettings; - y -= Styles.spaceBetweenSettings; - - headerHeight += settingsHeight; - - headerHeight += Styles.spaceAfterSettings; - y += Styles.spaceAfterSettings; - } - - if (showHeaderAddon) - { - var headerAddonHeight = GetHeaderAddonHeight(headerAddonWidth); - - headerAddonPosition = new Rect - ( - headerTextX, - y, - headerAddonWidth, - headerAddonHeight - ); - - headerHeight += headerAddonHeight; - y += headerAddonHeight; - } - - if (headerHeight < Styles.iconSize) - { - var difference = Styles.iconSize - headerHeight; - var centeringOffset = difference / 2; - - if (showTitle) - { - var _titlePosition = titlePosition; - _titlePosition.y += centeringOffset; - titlePosition = _titlePosition; - } - - if (showSubtitle) - { - var _subtitlePosition = subtitlePosition; - _subtitlePosition.y += centeringOffset; - subtitlePosition = _subtitlePosition; - } - - if (showSettings) - { - foreach (var setting in settings) - { - var _settingPosition = settingsPositions[setting]; - _settingPosition.y += centeringOffset; - settingsPositions[setting] = _settingPosition; - } - } - - if (showHeaderAddon) - { - var _headerAddonPosition = headerAddonPosition; - _headerAddonPosition.y += centeringOffset; - headerAddonPosition = _headerAddonPosition; - } - - headerHeight = Styles.iconSize; - } - - y = innerY + headerHeight; - - var innerHeight = 0f; - - innerHeight += headerHeight; - - if (showPorts) - { - innerHeight += Styles.spaceBeforePorts; - y += Styles.spaceBeforePorts; - - var portsBackgroundY = y; - var portsBackgroundHeight = 0f; - - portsBackgroundHeight += Styles.portsBackground.padding.top; - innerHeight += Styles.portsBackground.padding.top; - y += Styles.portsBackground.padding.top; - - var portStartY = y; - - var inputsHeight = 0f; - var outputsHeight = 0f; - - foreach (var input in inputs) - { - input.y = y; - - var inputHeight = input.GetHeight(); - - inputsHeight += inputHeight; - y += inputHeight; - - inputsHeight += Styles.spaceBetweenPorts; - y += Styles.spaceBetweenPorts; - } - - if (inputs.Count > 0) - { - inputsHeight -= Styles.spaceBetweenPorts; - y -= Styles.spaceBetweenPorts; - } - - y = portStartY; - - foreach (var output in outputs) - { - output.y = y; - - var outputHeight = output.GetHeight(); - - outputsHeight += outputHeight; - y += outputHeight; - - outputsHeight += Styles.spaceBetweenPorts; - y += Styles.spaceBetweenPorts; - } - - if (outputs.Count > 0) - { - outputsHeight -= Styles.spaceBetweenPorts; - y -= Styles.spaceBetweenPorts; - } - - var portsHeight = Math.Max(inputsHeight, outputsHeight); - - portsBackgroundHeight += portsHeight; - innerHeight += portsHeight; - y = portStartY + portsHeight; - - portsBackgroundHeight += Styles.portsBackground.padding.bottom; - innerHeight += Styles.portsBackground.padding.bottom; - y += Styles.portsBackground.padding.bottom; - - portsBackgroundPosition = new Rect - ( - edgeX, - portsBackgroundY, - edgeWidth, - portsBackgroundHeight - ); - } - - var edgeHeight = InnerToEdgePosition(new Rect(0, 0, 0, innerHeight)).height; - - _position = new Rect - ( - edgeX, - edgeY, - edgeWidth, - edgeHeight - ); - } - - protected virtual float GetHeaderAddonWidth() - { - return 0; - } - - protected virtual float GetHeaderAddonHeight(float width) - { - return 0; - } - - #endregion - - - #region Drawing - - protected virtual NodeColorMix baseColor => NodeColor.Gray; - - protected override NodeColorMix color - { - get - { - _isSpecialColor = false; - - if (unitDebugData.runtimeException != null) - { - return NodeColor.Red; - } - - var color = baseColor; - - if (analysis.warnings.Count > 0) - { - var mostSevereWarning = Warning.MostSevereLevel(analysis.warnings); - - switch (mostSevereWarning) - { - case WarningLevel.Error: - color = NodeColor.Red; - _isSpecialColor = true; - break; - - case WarningLevel.Severe: - color = NodeColor.Orange; - _isSpecialColor = true; - break; - - case WarningLevel.Caution: - color = NodeColor.Yellow; - - break; - } - } - - if (EditorApplication.isPaused) - { - if (EditorTimeBinding.frame == unitDebugData.lastInvokeFrame) - { - return NodeColor.Blue; - } - } - else - { - var mix = color; - mix.blue = Mathf.Lerp(1, 0, (EditorTimeBinding.time - unitDebugData.lastInvokeTime) / Styles.invokeFadeDuration); - - return mix; - } - - return color; - } - } - - protected override NodeShape shape => NodeShape.Square; - - protected virtual bool showTitle => !string.IsNullOrEmpty(description.shortTitle); - - protected virtual bool showSurtitle => !string.IsNullOrEmpty(description.surtitle); - - protected virtual bool showSubtitle => !string.IsNullOrEmpty(description.subtitle); - - protected virtual bool showIcons => description.icons.Length > 0; - - protected virtual bool showSettings => settingNames.Count > 0; - - protected virtual bool showHeaderAddon => false; - - protected virtual bool showPorts => ports.Count > 0; - - protected override bool dim - { - get - { - var dim = BoltCore.Configuration.dimInactiveNodes && !analysis.isEntered; - - if (isMouseOver || isSelected) - { - dim = false; - } - - if (BoltCore.Configuration.dimIncompatibleNodes && canvas.isCreatingConnection) - { - dim = !unit.ports.Any(p => canvas.connectionSource == p || canvas.connectionSource.CanValidlyConnectTo(p)); - } - - return dim; - } - } - - private List snapLines = new List(); - - protected void DrawSnapLines() - { - if (snapLines == null || snapLines.Count == 0) - return; - - Handles.color = new Color32(64, 113, 156, 255); - foreach (var line in snapLines) - { - Handles.DrawLine(line.start, line.end); - } - } - - private void ConvertToEmbed() - { - NodeSelection.Convert(GraphSource.Embed); - } - - private void ConvertToMacro() - { - NodeSelection.Convert(GraphSource.Macro); - } - - public override void DrawForeground() - { - if (isDragging && e.ctrlOrCmd) - DrawSnapLines(); - - BeginDim(); - - base.DrawForeground(); - - DrawIcon(); - - if (showSurtitle) - { - DrawSurtitle(); - } - - if (showTitle) - { - DrawTitle(); - } - - if (showSubtitle) - { - DrawSubtitle(); - } - - if (showIcons) - { - DrawIcons(); - } - - if (showSettings) - { - DrawSettings(); - } - - if (showHeaderAddon) - { - DrawHeaderAddon(); - } - - if (showPorts) - { - DrawPortsBackground(); - } - - EndDim(); - } - - protected void DrawIcon() - { - var icon = description.icon ?? BoltFlow.Icons.unit; - - if (icon != null && icon[(int)iconPosition.width]) - { - GUI.DrawTexture(iconPosition, icon[(int)iconPosition.width]); - } - } - - protected void DrawTitle() - { - GUI.Label(titlePosition, titleContent, invertForeground ? Styles.titleInverted : Styles.title); - } - - protected void DrawSurtitle() - { - GUI.Label(surtitlePosition, surtitleContent, invertForeground ? Styles.surtitleInverted : Styles.surtitle); - } - - protected void DrawSubtitle() - { - GUI.Label(subtitlePosition, subtitleContent, invertForeground ? Styles.subtitleInverted : Styles.subtitle); - } - - protected void DrawIcons() - { - for (int i = 0; i < description.icons.Length; i++) - { - var icon = description.icons[i]; - var position = iconsPositions[i]; - - GUI.DrawTexture(position, icon?[(int)position.width]); - } - } - - private void DrawSettings() - { - if (graph.zoom < FlowCanvas.inspectorZoomThreshold) - { - return; - } - - EditorGUI.BeginDisabledGroup(!e.IsRepaint && isMouseThrough && !isMouseOver); - - EditorGUI.BeginChangeCheck(); - - foreach (var setting in settings) - { - DrawSetting(setting); - } - - if (EditorGUI.EndChangeCheck()) - { - unit.Define(); - Reposition(); - } - - EditorGUI.EndDisabledGroup(); - } - - protected void DrawSetting(Metadata setting) - { - var settingPosition = settingsPositions[setting]; - - using (LudiqGUIUtility.currentInspectorWidth.Override(settingPosition.width)) - using (Inspector.expandTooltip.Override(false)) - { - var label = settingLabelsContents[setting]; - - if (label == null) - { - LudiqGUI.Inspector(setting, settingPosition, GUIContent.none); - } - else - { - using (Inspector.defaultLabelStyle.Override(Styles.settingLabel)) - using (LudiqGUIUtility.labelWidth.Override(Styles.settingLabel.CalcSize(label).x)) - { - LudiqGUI.Inspector(setting, settingPosition, label); - } - } - } - } - - protected virtual void DrawHeaderAddon() { } - - protected void DrawPortsBackground() - { - if (canvas.showRelations) - { - foreach (var relation in unit.relations) - { - var start = ports.Single(pw => pw.port == relation.source).handlePosition.center; - var end = ports.Single(pw => pw.port == relation.destination).handlePosition.center; - - var startTangent = start; - var endTangent = end; - - if (relation.source is IUnitInputPort && - relation.destination is IUnitInputPort) - { - startTangent -= new Vector2(20, 0); - endTangent -= new Vector2(32, 0); - } - else - { - startTangent += new Vector2(innerPosition.width / 2, 0); - endTangent += new Vector2(-innerPosition.width / 2, 0); - } - - Handles.DrawBezier - ( - start, - end, - startTangent, - endTangent, - ColorPalette.unityBackgroundMid, - null, - 3 - ); - } - } - else - { - if (e.IsRepaint) - { -#if NEW_UNIT_STYLE - var previous = GUI.backgroundColor; - - if (isSpecialPortsColor) - { - GUI.backgroundColor = PortsbackgroundColor ?? ToColor(color); - } - - Styles.portsBackground.Draw(portsBackgroundPosition, false, false, false, false); - - if (isSpecialPortsColor) - GUI.backgroundColor = previous; -#else - Styles.portsBackground.Draw(portsBackgroundPosition, false, false, false, false); -#endif - } - } - } - - #endregion - - private readonly Dictionary colorMap = new Dictionary() - { - { NodeColor.Gray, new Color(0.5f, 0.5f, 0.5f) }, - { NodeColor.Blue, new Color(0.25f, 0.6f, 1f) }, - { NodeColor.Teal, new Color(0f, 0.75f, 0.75f) }, - { NodeColor.Green, new Color(0.4f, 0.8f, 0.4f) }, - { NodeColor.Yellow, new Color(1f, 0.9f, 0.2f) }, - { NodeColor.Orange, new Color(1f, 0.6f, 0.2f) }, - { NodeColor.Red, new Color(1f, 0.3f, 0.3f) } - }; - - public Color ToColor(NodeColorMix mix) - { - mix = mix.normalized; - Color result = Color.black; - foreach (var kvp in mix) - if (colorMap.TryGetValue(kvp.Key, out var c)) - result += c * kvp.Value; - - result.r = Mathf.Clamp01(result.r); - result.g = Mathf.Clamp01(result.g); - result.b = Mathf.Clamp01(result.b); - result.a = 1f; - return result; - } - - #region Selecting - - public override bool canSelect => true; - - #endregion - - - #region Dragging - - public override bool canDrag => true; - - public override void ExpandDragGroup(HashSet dragGroup) - { - if (BoltCore.Configuration.carryChildren) - { - foreach (var output in unit.outputs) - { - foreach (var connection in output.connections) - { - if (dragGroup.Contains(connection.destination.unit)) - { - continue; - } - - dragGroup.Add(connection.destination.unit); - - canvas.Widget(connection.destination.unit).ExpandDragGroup(dragGroup); - } - } - } - } - - #endregion - - - #region Deleting - - public override bool canDelete => true; - - #endregion - - - #region Clipboard - - public override void ExpandCopyGroup(HashSet copyGroup) - { - copyGroup.UnionWith(unit.connections.Cast()); - } - - #endregion - - - #region Context - - protected override IEnumerable contextOptions - { - get - { - yield return new DropdownOption((Action)ReplaceUnit, "Replace..."); - - foreach (var baseOption in base.contextOptions) - { - yield return baseOption; - } - - if (selection.Count > 0) - { - yield return new DropdownOption((Action)ConvertToEmbed, "Selection/To Embed Subgraph"); - yield return new DropdownOption((Action)ConvertToMacro, "Selection/To Macro Subgraph"); - } - } - } - - private void ReplaceUnit() - { - UnitWidgetHelper.ReplaceUnit(unit, reference, context, selection, e); - } - - #endregion - - - public static class Styles - { - static Styles() - { - // Disabling word wrap because Unity's CalcSize and CalcHeight - // are broken w.r.t. pixel-perfection and matrix - - title = new GUIStyle(BoltCore.Styles.nodeLabel); - title.padding = new RectOffset(0, 5, 0, 2); - title.margin = new RectOffset(0, 0, 0, 0); - title.fontSize = 12; - title.alignment = TextAnchor.MiddleLeft; - title.wordWrap = false; - - surtitle = new GUIStyle(BoltCore.Styles.nodeLabel); - surtitle.padding = new RectOffset(0, 5, 0, 0); - surtitle.margin = new RectOffset(0, 0, 0, 0); - surtitle.fontSize = 10; - surtitle.alignment = TextAnchor.MiddleLeft; - surtitle.wordWrap = false; - - subtitle = new GUIStyle(surtitle); - subtitle.padding.bottom = 2; - - titleInverted = new GUIStyle(title); - titleInverted.normal.textColor = ColorPalette.unityBackgroundDark; - - surtitleInverted = new GUIStyle(surtitle); - surtitleInverted.normal.textColor = ColorPalette.unityBackgroundDark; - - subtitleInverted = new GUIStyle(subtitle); - subtitleInverted.normal.textColor = ColorPalette.unityBackgroundDark; - -#if NEW_UNIT_STYLE - if (EditorGUIUtility.isProSkin) - { - portsBackground = new GUIStyle - { - padding = new RectOffset(0, 0, 6, 5), - border = new RectOffset(0, 0, 2, 2) - }; - - portsBackground.normal.background = CommunityStyles.MakeBorderedTexture(CommunityStyles.backgroundColor, CommunityStyles.backgroundColor.Darken(0.05f)); - } - else - { - portsBackground = new GUIStyle - { - normal = { background = CommunityStyles.MakeBorderedTexture(CommunityStyles.backgroundColor, CommunityStyles.backgroundColor.Brighten(0.05f)) }, - padding = new RectOffset(0, 0, 6, 5) - }; - } -#else - portsBackground = VisualScripting.UnitWidget.Styles.portsBackground; -#endif - - settingLabel = new GUIStyle(BoltCore.Styles.nodeLabel); - settingLabel.padding.left = 0; - settingLabel.padding.right = 5; - settingLabel.wordWrap = false; - settingLabel.clipping = TextClipping.Clip; - } - - public static readonly GUIStyle title; - - public static readonly GUIStyle surtitle; - - public static readonly GUIStyle subtitle; - - public static readonly GUIStyle titleInverted; - - public static readonly GUIStyle surtitleInverted; - - public static readonly GUIStyle subtitleInverted; - - public static readonly GUIStyle settingLabel; - - public static readonly float spaceAroundLineIcon = 5; - - public static readonly float spaceBeforePorts = 5; - - public static readonly float spaceBetweenInputsAndOutputs = 8; - - public static readonly float spaceBeforeSettings = 2; - - public static readonly float spaceBetweenSettings = 3; - - public static readonly float spaceBetweenPorts = 3; - - public static readonly float spaceAfterSettings = 0; - - public static readonly float maxSettingsWidth = 150; - - public static readonly GUIStyle portsBackground; - - public static readonly float iconSize = IconSize.Medium; - - public static readonly float iconsSize = IconSize.Small; - - public static readonly float iconsSpacing = 3; - - public static readonly int iconsPerColumn = 2; - - public static readonly float spaceAfterIcon = 6; - - public static readonly float spaceAfterSurtitle = 2; - - public static readonly float spaceBeforeSubtitle = 0; - - public static readonly float invokeFadeDuration = 0.5f; - } - } - - internal class UnitWidgetHelper - { - internal static void ReplaceUnit(IUnit unit, GraphReference reference, IGraphContext context, GraphSelection selection, EventWrapper eventWrapper) - { - var oldUnit = unit; - var unitPosition = oldUnit.position; - var preservation = UnitPreservation.Preserve(oldUnit); - - var options = new UnitOptionTree(new GUIContent("Node")); - options.filter = UnitOptionFilter.Any; -#if VISUAL_SCRIPTING_1_8_0_OR_GREATER - options.filter.NoConnection = false; -#endif - options.reference = reference; - - var activatorPosition = new Rect(eventWrapper.mousePosition, new Vector2(200, 1)); - - LudiqGUI.FuzzyDropdown - ( - activatorPosition, - options, - null, - delegate (object _option) - { - var option = (IUnitOption)_option; - - context.BeginEdit(); - UndoUtility.RecordEditedObject("Replace Node"); - var graph = oldUnit.graph; - oldUnit.graph.units.Remove(oldUnit); - var newUnit = option.InstantiateUnit(); - newUnit.guid = Guid.NewGuid(); - newUnit.position = unitPosition; - graph.units.Add(newUnit); - preservation.RestoreTo(newUnit); - option.PreconfigureUnit(newUnit); - selection.Select(newUnit); - GUI.changed = true; - context.EndEdit(); - } - ); - } - } -} -#endif - -#endif \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitWidgetHelper.cs b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitWidgetHelper.cs new file mode 100644 index 00000000..7367362b --- /dev/null +++ b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitWidgetHelper.cs @@ -0,0 +1,49 @@ +using System; +using UnityEngine; + +namespace Unity.VisualScripting.Community +{ + internal class UnitWidgetHelper + { + internal static void ReplaceUnit(IUnit unit, GraphReference reference, IGraphContext context, GraphSelection selection, EventWrapper eventWrapper) + { + var oldUnit = unit; + var unitPosition = oldUnit.position; + var preservation = UnitPreservation.Preserve(oldUnit); + + var options = new UnitOptionTree(new GUIContent("Node")); + options.filter = new UnitOptionFilter(true); +#if VISUAL_SCRIPTING_1_8_0_OR_GREATER + options.filter.NoConnection = false; +#endif + options.reference = reference; + + var activatorPosition = new Rect(eventWrapper.mousePosition, new Vector2(200, 1)); + + LudiqGUI.FuzzyDropdown + ( + activatorPosition, + options, + null, + delegate (object _option) + { + var option = (IUnitOption)_option; + + context.BeginEdit(); + UndoUtility.RecordEditedObject("Replace Node"); + var graph = oldUnit.graph; + oldUnit.graph.units.Remove(oldUnit); + var newUnit = option.InstantiateUnit(); + newUnit.guid = Guid.NewGuid(); + newUnit.position = unitPosition; + graph.units.Add(newUnit); + preservation.RestoreTo(newUnit); + option.PreconfigureUnit(newUnit); + selection.Select(newUnit); + GUI.changed = true; + context.EndEdit(); + } + ); + } + } +} \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitWidgetHelper.cs.meta b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitWidgetHelper.cs.meta new file mode 100644 index 00000000..ad1689fd --- /dev/null +++ b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitWidgetHelper.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: abe95c0855f680d4596a291f6ea44e72 \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ValueConnectionWidget.cs b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ValueConnectionWidget.cs index a892cf08..0e580c30 100644 --- a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ValueConnectionWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ValueConnectionWidget.cs @@ -3,6 +3,7 @@ using System.Reflection; using UnityEditor; using UnityEngine; +using System.Collections.Generic; namespace Unity.VisualScripting.Community { @@ -12,6 +13,7 @@ public ValueConnectionWidget(FlowCanvas canvas, ValueConnection connection) : ba private new ValueConnection.DebugData ConnectionDebugData => GetDebugData(); + private static readonly Dictionary> _inspectableMembersCache = new Dictionary>(); #region Drawing @@ -64,11 +66,11 @@ public override void DrawForeground() { var innerRect = new Rect(labelPosition.x + 1, labelPosition.y + 1, labelPosition.width - 2, labelPosition.height - 2); - var colorText = exception.Message; - var textSize = Styles.prediction.CalcSize(new GUIContent(colorText)); + var errorText = exception.Message; + var textSize = Styles.prediction.CalcSize(new GUIContent(errorText)); var textRect = new Rect(labelPosition.x + labelPosition.width + 6, labelPosition.center.y - textSize.y / 2, textSize.x, textSize.y); - GUI.Label(textRect, colorText, Styles.prediction); + GUI.Label(textRect, errorText, Styles.prediction); } } else if (value is Color colorValue) @@ -110,21 +112,20 @@ public override void DrawForeground() if (labelPosition.Contains(Event.current.mousePosition)) { - var inspectableMembers = type - .GetMembers(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) - .Where(m => - { - if (m is FieldInfo f) - { - return f.IsPublic || f.HasAttribute() || f.HasAttribute() || f.HasAttribute(); - } - else if (m is PropertyInfo p) + if (!_inspectableMembersCache.TryGetValue(type, out var inspectableMembers)) + { + inspectableMembers = type + .GetMembers(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) + .Where(m => { - return (p.HasAttribute() || p.HasAttribute() || p.IsPubliclyGettable()) && p.CanRead; - } - return false; - }) - .ToList(); + if (m is FieldInfo f) return f.IsPublic || f.HasAttribute() || f.HasAttribute() || f.HasAttribute(); + if (m is PropertyInfo p) return (p.HasAttribute() || p.HasAttribute() || p.IsPubliclyGettable()) && p.CanRead; + return false; + }) + .ToList(); + + _inspectableMembersCache[type] = inspectableMembers; + } if (inspectableMembers.Count > 0) { @@ -137,16 +138,21 @@ public override void DrawForeground() var member = inspectableMembers[i]; object memberValue = null; + string str; try { if (member is FieldInfo fi) - memberValue = fi.GetValue(value); + memberValue = fi.GetValueOptimized(value); else if (member is PropertyInfo pi && pi.CanRead) - memberValue = pi.GetValue(value); + memberValue = pi.GetValueOptimized(value); + + str = $"{member.Name}: {memberValue?.ToString() ?? "null"}"; + } + catch + { + str = $"{member.Name}: Unknown"; } - catch { /* ignore inaccessible members */ } - string str = $"{member.Name}: {memberValue?.ToString() ?? "null"}"; lines[i] = str; var size = Styles.prediction.CalcSize(new GUIContent(str)); @@ -209,7 +215,45 @@ protected override void DrawConnection() } if (!hideConnection) + { +#if ENABLE_VERTICAL_FLOW + var color = this.color; + + var sourceWidget = canvas.Widget(connection.source); + var destinationWidget = canvas.Widget(connection.destination); + + var highlight = !canvas.isCreatingConnection && (sourceWidget.isMouseOver || destinationWidget.isMouseOver); + + var willDisconnect = sourceWidget.willDisconnect || destinationWidget.willDisconnect; + + if (willDisconnect) + { + color = UnitConnectionStyles.disconnectColor; + } + else if (highlight) + { + color = UnitConnectionStyles.highlightColor; + } + else if (colorIfActive) + { + if (EditorApplication.isPaused) + { + if (EditorTimeBinding.frame == ConnectionDebugData.lastInvokeFrame) + { + color = UnitConnectionStyles.activeColor; + } + } + else + { + color = Color.Lerp(UnitConnectionStyles.activeColor, color, (EditorTimeBinding.time - ConnectionDebugData.lastInvokeTime) / UnitWidget.Styles.invokeFadeDuration); + } + } + + GraphGUI.DrawConnection(color, sourceHandleEdgeCenter, destinationHandleEdgeCenter, Edge.Right, Edge.Left, null, Vector2.zero, CommunityStyles.relativeBend, CommunityStyles.minBend, CommunityStyles.connectionThickness); +#else base.DrawConnection(); +#endif + } } public override void CachePosition() @@ -218,11 +262,7 @@ public override void CachePosition() var rect = new Rect(sourceHandlePosition); - if (element.source.unit is ValueReroute srcReroute && srcReroute.hideConnection) - { - rect.width -= 5; - } - else if (element.destination.unit is ValueReroute desReroute && desReroute.hideConnection) + if (element.destination.unit is ValueReroute desReroute && desReroute.hideConnection) { rect.width -= 5; } @@ -238,55 +278,29 @@ public override void CachePosition() private bool IsMouseOverConnection(Vector2 mousePos, Vector2 start, Vector2 end, float threshold = 8f) { - float distance = Vector2.Distance(start, end); + if (!clippingPosition.Contains(mousePos)) + { + return false; + } + float distance = Vector2.Distance(start, end); int segments = Mathf.Clamp(Mathf.CeilToInt(distance / 10f), 12, 80); - float minDist = float.MaxValue; for (int i = 0; i <= segments; i++) { float t = i / (float)segments; - +#if ENABLE_VERTICAL_FLOW + Vector2 p = GraphGUI.GetPointOnConnection(t, start, end, Edge.Right, Edge.Left, CommunityStyles.relativeBend, CommunityStyles.minBend); +#else Vector2 p = GraphGUI.GetPointOnConnection(t, start, end, Edge.Right, Edge.Left, UnitConnectionStyles.relativeBend, UnitConnectionStyles.minBend); - +#endif float dist = Vector2.Distance(mousePos, p); - if (dist < minDist) - minDist = dist; + if (dist < minDist) minDist = dist; + if (minDist < threshold) return true; } - return minDist < threshold; - } - - protected override void DrawDroplets() - { - foreach (var droplet in droplets) - { - Vector2 position; - - if (droplet < handleAlignmentMargin) - { - var t = droplet / handleAlignmentMargin; - position = Vector2.Lerp(sourceHandlePosition.center, sourceHandleEdgeCenter, t); - } - else if (droplet > 1 - handleAlignmentMargin) - { - var t = (droplet - (1 - handleAlignmentMargin)) / handleAlignmentMargin; - position = Vector2.Lerp(destinationHandleEdgeCenter, destinationHandlePosition.center, t); - } - else - { - var t = (droplet - handleAlignmentMargin) / (1 - 2 * handleAlignmentMargin); - position = GraphGUI.GetPointOnConnection(t, sourceHandleEdgeCenter, destinationHandleEdgeCenter, Edge.Right, Edge.Left, UnitConnectionStyles.relativeBend, UnitConnectionStyles.minBend); - } - - var size = GetDropletSize(); - - using (LudiqGUI.color.Override(GUI.color * color)) - { - DrawDroplet(new Rect(position.x - size.x / 2, position.y - size.y / 2, size.x, size.y)); - } - } + return false; } public static Color DetermineColor(Type source, Type destination) diff --git a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ValueInputWidget.cs b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ValueInputWidget.cs index a5deaceb..9aea6bde 100644 --- a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ValueInputWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ValueInputWidget.cs @@ -26,13 +26,22 @@ protected override Texture handleTextureConnected { if (valueReroute.hideConnection) { - return PathUtil.Load("PortalConnectionIn", CommunityEditorPath.Fundamentals)?[16]; + return CommunityStyles.valuePortalConnection; } } - return BoltFlow.Icons.valuePortConnected?[12]; + return CommunityStyles.valuePortConnected; } } +#if !ENABLE_VERTICAL_FLOW + private const float HorizontalMinBlend = 20f; + protected override float connectionMinBend => HorizontalMinBlend; + protected override float connectionrelativeBend => UnitConnectionStyles.relativeBend; +#endif + + private readonly Vector2 handleSize = new Vector2(10, 10); + protected override Vector2 HandleSize => handleSize; + protected override void DrawConnectionSource() { var start = handlePosition.GetEdgeCenter(edge); @@ -42,11 +51,9 @@ protected override void DrawConnectionSource() canvas.connectionEnd = mousePosition; } - float minBend = 20f; - - Vector2 size = new Vector2(9, 12); + Vector2 size = handleSize; - if (e.alt) size = new Vector2(16, 16); + if (e.alt) size = PortalSize; GraphGUI.DrawConnection ( @@ -55,14 +62,19 @@ protected override void DrawConnectionSource() canvas.connectionEnd, edge, null, - e.alt ? PathUtil.Load("PortalConnectionIn", CommunityEditorPath.Fundamentals)?[16] : BoltFlow.Icons.valuePortConnected?[12], + e.alt ? CommunityStyles.valuePortalConnection : CommunityStyles.valuePortConnected, size, +#if ENABLE_VERTICAL_FLOW + CommunityStyles.relativeBend, + CommunityStyles.minBend +#else UnitConnectionStyles.relativeBend, - minBend + HorizontalMinBlend +#endif ); } - protected override Texture handleTextureUnconnected => BoltFlow.Icons.valuePortUnconnected?[12]; + protected override Texture handleTextureUnconnected => CommunityStyles.valuePortUnconnected; public override void CachePosition() { @@ -72,8 +84,8 @@ public override void CachePosition() var outside = edge.Normal().x; var inside = -outside; var flip = inside < 0; - var width = VisualScripting.UnitPortWidget.Styles.handleSize.x; - var height = VisualScripting.UnitPortWidget.Styles.handleSize.y; + var width = 10; + var height = 10; var connection = port.connection; bool hide = false; diff --git a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ValueOutputWidget.cs b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ValueOutputWidget.cs index e6e7632c..1fbe2030 100644 --- a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ValueOutputWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/ValueOutputWidget.cs @@ -26,44 +26,24 @@ protected override Texture handleTextureConnected { if (connections.FirstOrDefault(c => c.destination?.unit is ValueReroute)?.destination?.unit is ValueReroute valueReroute && valueReroute.hideConnection) { - return PathUtil.Load("PortalConnectionIn", CommunityEditorPath.Fundamentals)?[16]; + return CommunityStyles.valuePortalConnection; } } - return BoltFlow.Icons.valuePortConnected?[12]; - } - } - - protected override Texture handleTextureUnconnected => BoltFlow.Icons.valuePortUnconnected?[12]; - protected override void DrawConnectionSource() - { - var start = handlePosition.GetEdgeCenter(edge); - - if (window.IsFocused()) - { - canvas.connectionEnd = mousePosition; + return CommunityStyles.valuePortConnected; } + } - float minBend = 20f; - - Vector2 size = new Vector2(9, 12); - - if (e.alt) size = new Vector2(16, 16); + protected override Texture handleTextureUnconnected => CommunityStyles.valuePortUnconnected; - GraphGUI.DrawConnection - ( - color, - start, - canvas.connectionEnd, - edge, - null, - e.alt ? PathUtil.Load("PortalConnectionIn", CommunityEditorPath.Fundamentals)?[16] : BoltFlow.Icons.valuePortConnected?[12], - size, - UnitConnectionStyles.relativeBend, - minBend - ); - } +#if !ENABLE_VERTICAL_FLOW + private const float HorizontalMinBlend = 20f; + protected override float connectionMinBend => HorizontalMinBlend; + protected override float connectionrelativeBend => UnitConnectionStyles.relativeBend; +#endif + private readonly Vector2 handleSize = new Vector2(10, 10); + protected override Vector2 HandleSize => handleSize; public override void CachePosition() { @@ -74,8 +54,8 @@ public override void CachePosition() var inside = -outside; var flip = inside < 0; - var width = VisualScripting.UnitPortWidget.Styles.handleSize.x; - var height = VisualScripting.UnitPortWidget.Styles.handleSize.y; + var width = 10; + var height = 10; bool hide = false; diff --git a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/VerticalUnitWidget.cs b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/VerticalUnitWidget.cs new file mode 100644 index 00000000..66de6d7e --- /dev/null +++ b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/VerticalUnitWidget.cs @@ -0,0 +1,1279 @@ +#if NEW_UNIT_UI && ENABLE_VERTICAL_FLOW +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; +using Unity.VisualScripting.Community.Libraries.Humility; +namespace Unity.VisualScripting.Community +{ + public class UnitWidget : NodeWidget, IUnitWidget where TUnit : class, IUnit + { + public UnitWidget(FlowCanvas canvas, TUnit unit) : base(canvas, unit) + { + unit.onPortsChanged += CacheDefinition; + unit.onPortsChanged += SubWidgetsChanged; + } + + public override void Dispose() + { + base.Dispose(); + + unit.onPortsChanged -= CacheDefinition; + unit.onPortsChanged -= SubWidgetsChanged; + } + + public override IEnumerable subWidgets => unit.ports.Select(port => canvas.Widget(port)); + + #region Model + + protected TUnit unit => element; + + IUnit IUnitWidget.unit => unit; + + protected IUnitDebugData unitDebugData => GetDebugData(); + + private UnitDescription description; + + private UnitAnalysis analysis => unit.Analysis(context); + + protected readonly List ports = new List(); + + protected readonly List inputs = new List(); + + protected readonly List outputs = new List(); + + private readonly List settingNames = new List(); + + public override Rect hotArea => outerPosition; + + protected readonly List settings = new List(); + + protected override void CacheItemFirstTime() + { + base.CacheItemFirstTime(); + CacheDefinition(); + } + + protected virtual void CacheDefinition() + { + inputs.Clear(); + outputs.Clear(); + ports.Clear(); + inputs.AddRange(unit.inputs.Select(port => canvas.Widget(port))); + outputs.AddRange(unit.outputs.Select(port => canvas.Widget(port))); + ports.AddRange(inputs); + ports.AddRange(outputs); + + Reposition(); + } + + protected override void CacheDescription() + { + description = unit.Description(); + + titleContent.text = description.shortTitle; + titleContent.tooltip = description.summary; + surtitleContent.text = description.surtitle; + subtitleContent.text = description.subtitle; + + Reposition(); + } + + protected override void CacheMetadata() + { + settingNames.Clear(); + + settingNames.AddRange(metadata.valueType + .GetMembers() + .Where(mi => mi.HasAttribute()) + .OrderBy(mi => mi.GetAttributes().OfType().FirstOrDefault()?.order ?? int.MaxValue) + .ThenBy(mi => mi.MetadataToken) + .Select(mi => mi.Name)); + + foreach (var name in settingNames) + { + settings.Add(metadata[name]); + } + + lock (settingLabelsContents) + { + settingLabelsContents.Clear(); + + foreach (var setting in settings) + { + var settingLabel = setting.GetAttribute().label; + + GUIContent settingContent; + + if (string.IsNullOrEmpty(settingLabel)) + { + settingContent = null; + } + else + { + settingContent = new GUIContent(settingLabel); + } + + settingLabelsContents.Add(setting, settingContent); + } + } + + Reposition(); + } + + public virtual Inspector GetPortInspector(IUnitPort port, Metadata metadata) + { + return metadata.Inspector(); + } + + #endregion + + + #region Lifecycle + + public override bool foregroundRequiresInput => showSettings || unit.valueInputs.Any(vip => vip.hasDefaultValue); + + protected virtual IEnumerable SnapTargets + { + get + { + foreach (var e in graph.elements) + { + if (e != element && !(e is IUnitConnection)) + { + yield return e; + } + } + } + } + + private List _cachedSnapTargets; + + public override void HandleInput() + { + if (AllowRectSnapping && isDragging && e.ctrlOrCmd) + { + if (_cachedSnapTargets == null) + { + _cachedSnapTargets = new List(); + foreach (var target in SnapTargets) + { + _cachedSnapTargets.Add(SnapTarget(target)); + } + } + + var snapResult = RectUtility.CheckSnap(outerPosition, _cachedSnapTargets, threshold: 15f); + snapLines.Clear(); + + if (snapResult.snapped) + { + var pos = BoltCore.Configuration.snapToGrid ? GraphGUI.SnapToGrid(snapResult.snapPosition) : snapResult.snapPosition; + _position = OuterToEdgePosition(new Rect(pos.x, pos.y, _position.width, _position.height)); + + if (snapResult.hasVerticalLine) snapLines.Add(snapResult.verticalLine); + if (snapResult.hasHorizontalLine) snapLines.Add(snapResult.horizontalLine); + + Reposition(); + } + } + else + { + if (_cachedSnapTargets != null) + { + _cachedSnapTargets = null; + snapLines.Clear(); + } + } + + if (canvas.isCreatingConnection) + { + if (e.IsMouseDown(MouseButton.Left)) + { + var source = canvas.connectionSource; + var destination = source.CompatiblePort(unit); + + if (destination != null) + { + UndoUtility.RecordEditedObject("Connect Nodes"); + source.ValidlyConnectTo(destination); + canvas.connectionSource = null; + canvas.Widget(source.unit).Reposition(); + canvas.Widget(destination.unit).Reposition(); + GUI.changed = true; + } + + e.Use(); + } + else if (e.IsMouseDown(MouseButton.Right)) + { + canvas.CancelConnection(); + e.Use(); + } + } + + base.HandleInput(); + } + + private Rect SnapTarget(IGraphItem e) + { + if (e is Unit unit) + { + return canvas.Widget(unit).outerPosition; + } + return canvas.Widget(e).position; + } + + #endregion + + + #region Contents + + protected readonly GUIContent titleContent = new GUIContent(); + + protected readonly GUIContent surtitleContent = new GUIContent(); + + protected readonly GUIContent subtitleContent = new GUIContent(); + + protected readonly Dictionary settingLabelsContents = new Dictionary(); + + #endregion + + + #region Positioning + + protected override bool snapToGrid => BoltCore.Configuration.snapToGrid; + + protected virtual Color? PortsbackgroundColor => null; + + public override IEnumerable positionDependers => ports.Cast(); + + protected Rect _position; + + public override Rect position + { + get { return _position; } + set { unit.position = value.position; } + } + + public Rect titlePosition { get; protected set; } + + public Rect surtitlePosition { get; protected set; } + + public Rect subtitlePosition { get; protected set; } + + public Rect iconPosition { get; protected set; } + + public List iconsPositions { get; protected set; } = new List(); + + public Dictionary settingsPositions { get; } = new Dictionary(); + + public Rect headerAddonPosition { get; protected set; } + + public Rect portsBackgroundPosition { get; protected set; } + + private readonly List<(float, SeparatorPosition)> rowDividerPositions = new List<(float, SeparatorPosition)>(); + + private readonly List controlInputDividersX = new List(); + private readonly List controlOutputDividersX = new List(); + + private readonly List _valueInputs = new List(); + private readonly List _valueOutputs = new List(); + private readonly List _controlInputs = new List(); + private readonly List _controlOutputs = new List(); + + private enum SeparatorPosition + { + Left, + Right, + Full + } + + public override void CachePosition() + { + const float compactY = 0.5f; + const float compactX = 0.8f; + const float spaceBetweenControlPorts = 10; + + _valueInputs.Clear(); + _valueOutputs.Clear(); + _controlInputs.Clear(); + _controlOutputs.Clear(); + + float valueInputsWidth = 0f; + float maxCiWidth = 0f; + + for (int i = 0; i < inputs.Count; i++) + { + var p = inputs[i]; + if (p is ValueInputWidget || p is InvalidInputWidget) + { + _valueInputs.Add(p); + valueInputsWidth = Mathf.Max(valueInputsWidth, p.GetInnerWidth()); + } + else if (p is ControlInputWidget ci) + { + _controlInputs.Add(ci); + maxCiWidth = Mathf.Max(maxCiWidth, ci.GetInnerWidth()); + } + } + + float valueOutputsWidth = 0f; + float maxCoWidth = 0f; + + for (int i = 0; i < outputs.Count; i++) + { + var p = outputs[i]; + if (p is ValueOutputWidget || p is InvalidOutputWidget) + { + _valueOutputs.Add(p); + valueOutputsWidth = Mathf.Max(valueOutputsWidth, p.GetInnerWidth()); + } + else if (p is ControlOutputWidget co) + { + _controlOutputs.Add(co); + maxCoWidth = Mathf.Max(maxCoWidth, co.GetInnerWidth()); + } + } + + var portsWidth = valueInputsWidth + Styles.spaceBetweenInputsAndOutputs + valueOutputsWidth; + + if (_controlInputs.Count > 0) + { + portsWidth = Mathf.Max(portsWidth, Mathf.Min(90f, maxCiWidth + spaceBetweenControlPorts) * _controlInputs.Count); + } + + if (_controlOutputs.Count > 0) + { + portsWidth = Mathf.Max(portsWidth, Mathf.Min(90f, maxCoWidth + spaceBetweenControlPorts) * _controlOutputs.Count); + } + + settingsPositions.Clear(); + float settingsWidth = 0f; + + if (showSettings) + { + for (int i = 0; i < settings.Count; i++) + { + var setting = settings[i]; + var content = settingLabelsContents[setting]; + float settingWidth = 0f; + + if (content != null) + settingWidth += Styles.settingLabel.CalcSize(content).x; + + settingWidth += setting.Inspector().GetAdaptiveWidth(); + settingWidth = Mathf.Min(settingWidth, Styles.maxSettingsWidth); + + settingsPositions.Add(setting, new Rect(0, 0, settingWidth, 0)); + settingsWidth = Mathf.Max(settingsWidth, settingWidth); + } + } + + var headerAddonWidth = showHeaderAddon ? GetHeaderAddonWidth() : 0f; + var headerTextWidth = Styles.title.CalcSize(titleContent).x; + + if (showSurtitle) headerTextWidth = Mathf.Max(headerTextWidth, Styles.surtitle.CalcSize(surtitleContent).x); + if (showSubtitle) headerTextWidth = Mathf.Max(headerTextWidth, Styles.subtitle.CalcSize(subtitleContent).x); + + var iconsWidth = 0f; + if (showIcons && description.icons.Length > 0) + { + var iconsColumns = Mathf.Ceil((float)description.icons.Length / Styles.iconsPerColumn); + iconsWidth = iconsColumns * Styles.iconsSize + ((iconsColumns - 1) * Styles.iconsSpacing * compactX); + } + + var headerWidth = Mathf.Max(headerTextWidth + iconsWidth, Mathf.Max(settingsWidth, headerAddonWidth)) + Styles.iconSize + (Styles.spaceAfterIcon * compactX); + var innerWidth = Mathf.Max(portsWidth, headerWidth); + var edgeWidth = InnerToEdgePosition(new Rect(0, 0, innerWidth, 0)).width; + + var edgeOrigin = unit.position; + var innerOrigin = EdgeToInnerPosition(new Rect(edgeOrigin, Vector2.zero)).position; + var innerX = innerOrigin.x; + var innerY = innerOrigin.y; + + var y = innerY; + var headerHeight = 0f; + + float ciHeight = 0; + for (int i = 0; i < _controlInputs.Count; i++) + { + if (_controlInputs[i].showLabel) + { + ciHeight = Mathf.Max(ciHeight, _controlInputs[i].GetHeight()); + } + } + +#if !NEW_UNIT_STYLE + const int NormalStyleExtraHeight = 4; + if (ciHeight > 0) ciHeight += NormalStyleExtraHeight; +#endif + headerHeight += ciHeight; + y += ciHeight; + + iconPosition = new Rect(innerX, y, Styles.iconSize, Styles.iconSize); + var headerTextX = iconPosition.xMax + Styles.spaceAfterIcon * compactX; + + if (showSurtitle) + { + var h = Styles.surtitle.CalcHeight(surtitleContent, headerTextWidth); + surtitlePosition = new Rect(headerTextX, y, headerTextWidth, h); + float step = h + Styles.spaceAfterSurtitle * compactY; + headerHeight += step; + y += step; + } + + if (showTitle) + { + if (!showSurtitle && !showSettings && (!showSettings || settings?.Count == 0) && (!showHeaderAddon || GetHeaderAddonHeight(headerAddonWidth) == 0)) + { + // Ensure the Title and Unit Icon are lined up + const int TitleYPadding = 3; + y += TitleYPadding; + } + var h = Styles.title.CalcHeight(titleContent, headerTextWidth); + titlePosition = new Rect(headerTextX, y, headerTextWidth, h); + headerHeight += h; + y += h; + } + + if (showSubtitle) + { + float step = Styles.spaceBeforeSubtitle * compactY; + headerHeight += step; + y += step; + var h = Styles.subtitle.CalcHeight(subtitleContent, headerTextWidth); + subtitlePosition = new Rect(headerTextX, y, headerTextWidth, h); + headerHeight += h; + y += h; + } + + iconsPositions.Clear(); + if (showIcons) + { + int iconRow = 0, iconCol = 0; + for (int i = 0; i < description.icons.Length; i++) + { + iconsPositions.Add(new Rect( + innerX + innerWidth - ((iconCol + 1) * Styles.iconsSize) - (iconCol * Styles.iconsSpacing), + innerY + (iconRow * (Styles.iconsSize + Styles.iconsSpacing)), + Styles.iconsSize, Styles.iconsSize)); + + if (++iconRow % Styles.iconsPerColumn == 0) { iconCol++; iconRow = 0; } + } + } + + if (showSettings && settings?.Count > 0) + { + headerHeight += Styles.spaceBeforeSettings * compactY; + y += Styles.spaceBeforeSettings * compactY; + int lastIndex = settings.Count - 1; + for (int i = 0; i < settings.Count; i++) + { + var setting = settings[i]; + var rect = settingsPositions[setting]; + float settingWidth = rect.width; + using (LudiqGUIUtility.currentInspectorWidth.Override(settingWidth)) + { + float sHeight = LudiqGUI.GetInspectorHeight(null, setting, settingWidth, settingLabelsContents[setting] ?? GUIContent.none); + settingsPositions[setting] = new Rect(headerTextX, y, settingWidth, sHeight); + float spacing = (i == lastIndex) ? -Styles.spaceBetweenSettings : Styles.spaceBetweenSettings; + y += sHeight + spacing; + headerHeight += sHeight + spacing; + } + } + } + + if (showHeaderAddon) + { + headerHeight += Styles.spaceBeforeSettings; + y += Styles.spaceBeforeSettings; + + var headerAddonHeight = GetHeaderAddonHeight(headerAddonWidth); + + headerAddonPosition = new Rect(iconPosition.xMax, y, headerAddonWidth, headerAddonHeight); + + headerHeight += headerAddonHeight; + y += headerAddonHeight; + } + + var edgeX = edgeOrigin.x; + var edgeY = edgeOrigin.y; + + headerHeight = Mathf.Max(headerHeight, Styles.iconSize * 0.7f); + + y = innerY + headerHeight + Styles.spaceBeforePorts; + var innerHeight = headerHeight; + + var controlOutputsHeight = 0f; + + if (showPorts) + { + bool hasValuePorts = _valueInputs.Count > 0 || _valueOutputs.Count > 0; + + rowDividerPositions.Clear(); + controlInputDividersX.Clear(); + controlOutputDividersX.Clear(); + + if (hasValuePorts) + { + innerHeight += Styles.spaceBeforePorts * compactY; + y += Styles.spaceBeforePorts * compactY; + } + + float portsBackgroundY = y; + float portsBackgroundHeight = hasValuePorts ? Styles.portsBackground.padding.top * compactY : 0f; + y += portsBackgroundHeight; + + var portStartY = y; + const float rowHeight = 26f; + float currentInputsY = y; + float currentOutputsY = y; + + int maxRows = _valueInputs.Count > _valueOutputs.Count ? _valueInputs.Count : _valueOutputs.Count; + + if (hasValuePorts) + { + rowDividerPositions.Add((currentInputsY, SeparatorPosition.Full)); + } + + for (int i = 0; i < maxRows; i++) + { + if (i < _valueInputs.Count) + { + var widget = _valueInputs[i]; + widget.y = currentInputsY + (rowHeight * 0.5f) - (widget.GetHeight() * 0.5f); + } + + if (i < _valueOutputs.Count) + { + var widget = _valueOutputs[i]; + widget.y = currentOutputsY + (rowHeight * 0.5f) - (widget.GetHeight() * 0.5f); + } + + currentInputsY += rowHeight; + currentOutputsY += rowHeight; + + if (i < maxRows - 1) + { + SeparatorPosition length = SeparatorPosition.Full; + + bool nextHasInput = (i + 1) < _valueInputs.Count; + bool nextHasOutput = (i + 1) < _valueOutputs.Count; + + bool currentHasInput = i < _valueInputs.Count; + bool currentHasOutput = i < _valueOutputs.Count; + + bool isLeftActive = nextHasInput || currentHasInput; + bool isRightActive = nextHasOutput || currentHasOutput; + + if (isLeftActive && !isRightActive) + length = SeparatorPosition.Left; + else if (!isLeftActive && isRightActive) + length = SeparatorPosition.Right; + + rowDividerPositions.Add((currentInputsY, length)); + } + } + + float portsHeight = Mathf.Max(currentInputsY - portStartY, currentOutputsY - portStartY); + y = portStartY + portsHeight; + + if (hasValuePorts) + { + portsBackgroundHeight += portsHeight - 6; + innerHeight += portsHeight - 6; + } + + const int ExtraSpaceBeforePorts = 4; + + if (_controlInputs.Count > 0) + { + int portCount = _controlInputs.Count; + float controlY = edgeY - (Styles.spaceBeforePorts + ExtraSpaceBeforePorts) - Styles.spaceAfterControlInputs; + + float totalSlotSpace = edgeWidth - Styles.spaceBeforePorts; + float slotWidth = totalSlotSpace / portCount; + + for (int i = 0; i < portCount; i++) + { + var widget = _controlInputs[i]; + float slotCenter = edgeX + (slotWidth * (i + 0.5f)) - Styles.spaceBeforePorts; + widget.x = slotCenter; + widget.y = controlY; + + if (i < portCount - 1) + { + controlInputDividersX.Add(edgeX + (slotWidth * (i + 1))); + } + } + } + + if (_controlOutputs.Count > 0) + { + int portCount = _controlOutputs.Count; + float maxCoHeight = 0f; + + for (int i = 0; i < _controlOutputs.Count; i++) + { + float h = _controlOutputs[i].GetHeight(); + if (h > maxCoHeight) maxCoHeight = h; + } + + controlOutputsHeight = maxCoHeight; + + const int ControlOutputsPadding = 3; + float controlY = innerY + innerHeight + Styles.spaceBeforePorts + + ExtraSpaceBeforePorts + controlOutputsHeight + ControlOutputsPadding + Styles.spaceBeforeControlOutputs; + + float totalSlotSpace = edgeWidth - Styles.spaceBeforePorts; + float slotWidth = totalSlotSpace / portCount; + + for (int i = 0; i < portCount; i++) + { + var widget = _controlOutputs[i]; + float slotCenter = edgeX + (slotWidth * (i + 0.5f)) - Styles.spaceBeforePorts; + widget.x = slotCenter; + widget.y = controlY; + + if (i < portCount - 1) + { + controlOutputDividersX.Add(edgeX + (slotWidth * (i + 1))); + } + } + } + + portsBackgroundPosition = new Rect(edgeX, portsBackgroundY, edgeWidth, portsBackgroundHeight); + } + + var edgeHeight = InnerToEdgePosition(new Rect(0, 0, 0, innerHeight)).height; + _position = new Rect(edgeX, edgeY, edgeWidth, edgeHeight + controlOutputsHeight); + } + + protected virtual float GetHeaderAddonWidth() + { + return 0; + } + + protected virtual float GetHeaderAddonHeight(float width) + { + return 0; + } + + #endregion + + + #region Drawing + + protected virtual bool AllowRectSnapping => true; + + private List snapLines = new List(); + + protected void DrawSnapLines() + { + if (snapLines == null || snapLines.Count == 0) + return; + + var oldColor = Handles.color; + + Handles.color = new Color32(64, 113, 156, 255); + + foreach (var line in snapLines) + { + Handles.DrawLine(line.start, line.end); + } + + Handles.color = oldColor; + } + + protected virtual NodeColorMix baseColor => NodeColor.Gray; + + protected override NodeColorMix color + { + get + { + if (unitDebugData.runtimeException != null) + { + return NodeColor.Red; + } + + var color = baseColor; + + if (analysis.warnings.Count > 0) + { + var mostSevereWarning = Warning.MostSevereLevel(analysis.warnings); + + switch (mostSevereWarning) + { + case WarningLevel.Error: + color = NodeColor.Red; + break; + + case WarningLevel.Severe: + color = NodeColor.Orange; + break; + + case WarningLevel.Caution: + color = NodeColor.Yellow; + + break; + } + } + + if (EditorApplication.isPaused) + { + if (EditorTimeBinding.frame == unitDebugData.lastInvokeFrame) + { + return NodeColor.Blue; + } + } + else + { + var mix = color; + mix.blue = Mathf.Lerp(1, 0, (EditorTimeBinding.time - unitDebugData.lastInvokeTime) / Styles.invokeFadeDuration); + + return mix; + } + + return color; + } + } + + protected override NodeShape shape => NodeShape.Square; + + protected virtual bool showTitle => !string.IsNullOrEmpty(description.shortTitle); + + protected virtual bool showSurtitle => !string.IsNullOrEmpty(description.surtitle); + + protected virtual bool showSubtitle => !string.IsNullOrEmpty(description.subtitle); + + protected virtual bool showIcons => description.icons.Length > 0; + + protected virtual bool showSettings => settingNames.Count > 0; + + protected virtual bool showHeaderAddon => false; + + protected virtual bool showPorts => ports.Count > 0; + + protected override bool dim + { + get + { + var dim = BoltCore.Configuration.dimInactiveNodes && !analysis.isEntered; + + if (isMouseOver || isSelected) + { + dim = false; + } + + if (BoltCore.Configuration.dimIncompatibleNodes && canvas.isCreatingConnection) + { + bool canConnect = false; + foreach (var p in unit.ports) + { + if (canvas.connectionSource == p || canvas.connectionSource.CanValidlyConnectTo(p)) + { + canConnect = true; + break; + } + } + dim = !canConnect; + } + + return dim; + } + } + public override void DrawOverlay() + { + base.DrawOverlay(); + if (AllowRectSnapping && isDragging && e.ctrlOrCmd) + DrawSnapLines(); + } + public override void DrawForeground() + { + BeginDim(); + + base.DrawForeground(); + + DrawIcon(); + + if (showSurtitle) + { + DrawSurtitle(); + } + + if (showTitle) + { + DrawTitle(); + } + + if (showSubtitle) + { + DrawSubtitle(); + } + + if (showIcons) + { + DrawIcons(); + } + + if (showSettings) + { + DrawSettings(); + } + + if (showHeaderAddon) + { + DrawHeaderAddon(); + } + + if (showPorts) + { + DrawPortsBackground(); + } + + EndDim(); + } + + protected void DrawIcon() + { + var icon = description.icon ?? BoltFlow.Icons.unit; + + if (icon != null && icon[(int)iconPosition.width]) + { + GUI.DrawTexture(iconPosition, icon[(int)iconPosition.width]); + } + } + + protected void DrawTitle() + { + GUI.Label(titlePosition, titleContent, invertForeground ? Styles.titleInverted : Styles.title); + } + + protected void DrawSurtitle() + { + GUI.Label(surtitlePosition, surtitleContent, invertForeground ? Styles.surtitleInverted : Styles.surtitle); + } + + protected void DrawSubtitle() + { + GUI.Label(subtitlePosition, subtitleContent, invertForeground ? Styles.subtitleInverted : Styles.subtitle); + } + + protected void DrawIcons() + { + for (int i = 0; i < description.icons.Length; i++) + { + var icon = description.icons[i]; + var position = iconsPositions[i]; + + GUI.DrawTexture(position, icon?[(int)position.width]); + } + } + + private void DrawSettings() + { + if (graph.zoom < FlowCanvas.inspectorZoomThreshold) + { + return; + } + + EditorGUI.BeginDisabledGroup(!e.IsRepaint && isMouseThrough && !isMouseOver); + + EditorGUI.BeginChangeCheck(); + + foreach (var setting in settings) + { + DrawSetting(setting); + } + + if (EditorGUI.EndChangeCheck()) + { + unit.Define(); + Reposition(); + } + + EditorGUI.EndDisabledGroup(); + } + + protected void DrawSetting(Metadata setting) + { + var settingPosition = settingsPositions[setting]; + + using (LudiqGUIUtility.currentInspectorWidth.Override(settingPosition.width)) + using (Inspector.expandTooltip.Override(false)) + { + var label = settingLabelsContents[setting]; + + if (label == null) + { + LudiqGUI.Inspector(setting, settingPosition, GUIContent.none); + } + else + { + using (Inspector.defaultLabelStyle.Override(Styles.settingLabel)) + using (LudiqGUIUtility.labelWidth.Override(Styles.settingLabel.CalcSize(label).x)) + { + LudiqGUI.Inspector(setting, settingPosition, label); + } + } + } + } + + protected virtual void DrawHeaderAddon() { } + + protected static readonly Color portsSeparatorColor = new Color(0.15f, 0.15f, 0.15f, 1f); + + private IUnitPortWidget Single(IUnitPort targetPort) + { + IUnitPortWidget widget = null; + for (int i = 0; i < ports.Count; i++) + { + if (ports[i].port == targetPort) + { + widget = ports[i]; + break; + } + } + return widget; + } + + protected void DrawPortsBackground() + { + if (canvas.showRelations) + { + foreach (var relation in unit.relations) + { + var sourcePort = relation.source; + var destinationPort = relation.destination; + IUnitPortWidget sourceWidget = Single(sourcePort); + var destinationWidget = Single(destinationPort); + + Vector2 start = sourceWidget.handlePosition.center; + Vector2 end = destinationWidget.handlePosition.center; + + bool valueToControl = + sourcePort is ValueInput && + destinationPort is ControlInput; + + // Requirement + if (valueToControl) + { + start = sourceWidget.handlePosition.center; + + end = new Vector2( + destinationWidget.handlePosition.center.x, + destinationWidget.handlePosition.yMin + ); + } + + float distance = Vector2.Distance(start, end); + float offset = Mathf.Min(distance * 0.35f, 40f); + + Vector2 startDir; + Vector2 endDir; + + if (valueToControl) + { + startDir = Vector2.up; + endDir = Vector2.down; + } + else + { + startDir = PortDirection(sourcePort); + endDir = PortDirection(destinationPort); + } + + Vector2 startTangent = start + startDir * offset; + Vector2 endTangent = end + endDir * offset; + + Handles.DrawBezier( + start, + end, + startTangent, + endTangent, + ColorPalette.unityBackgroundDark, + null, + 3f + ); + } + + static Vector2 PortDirection(IUnitPort port) + { + return port switch + { + ControlOutput => Vector2.down, + ControlInput => Vector2.up, + + ValueOutput => Vector2.left, + ValueInput => Vector2.right, + + _ => Vector2.right + }; + } + } + else + { + float edgeX = edgePosition.x; + float fullWidth = edgePosition.width; + float halfWidth = fullWidth * 0.5f; + float midX = edgeX + halfWidth; + +#if NEW_UNIT_STYLE + float outerY = outerPosition.y + 2f; + float innerY = innerPosition.yMax - 2f; +#else + float outerY = outerPosition.y + 4f; + float innerY = innerPosition.yMax - 5f; +#endif + + int rowCount = rowDividerPositions.Count; + for (int i = 0; i < rowCount; i++) + { + float lineY = rowDividerPositions[i].Item1; + SeparatorPosition length = rowDividerPositions[i].Item2; + + float x = edgeX; + float w = fullWidth; + + if (length == SeparatorPosition.Left) + { + w = halfWidth; + } + else if (length == SeparatorPosition.Right) + { + x = midX; + w = halfWidth; + } + + EditorGUI.DrawRect(new Rect(x, lineY, w, 1f), portsSeparatorColor); + } + + int inputCount = controlInputDividersX.Count; + for (int i = 0; i < inputCount; i++) + { + EditorGUI.DrawRect(new Rect(controlInputDividersX[i], outerY, 1f, 16f), portsSeparatorColor); + } + + int outputCount = controlOutputDividersX.Count; + for (int i = 0; i < outputCount; i++) + { + EditorGUI.DrawRect(new Rect(controlOutputDividersX[i], innerY, 1f, 16f), portsSeparatorColor); + } + } + } + + #endregion + + + #region Selecting + + public override bool canSelect => true; + + #endregion + + + #region Dragging + + public override bool canDrag => true; + + public override void ExpandDragGroup(HashSet dragGroup) + { + if (BoltCore.Configuration.carryChildren) + { + foreach (var output in unit.outputs) + { + foreach (var connection in output.connections) + { + if (dragGroup.Contains(connection.destination.unit)) + { + continue; + } + + dragGroup.Add(connection.destination.unit); + + canvas.Widget(connection.destination.unit).ExpandDragGroup(dragGroup); + } + } + } + } + + #endregion + + + #region Deleting + + public override bool canDelete => true; + + #endregion + + + #region Clipboard + + public override void ExpandCopyGroup(HashSet copyGroup) + { + copyGroup.UnionWith(unit.connections.Cast()); + } + + #endregion + + + #region Context + + protected override IEnumerable contextOptions + { + get + { + yield return new DropdownOption((Action)ReplaceUnit, "Replace..."); + + foreach (var baseOption in base.contextOptions) + { + yield return baseOption; + } + + if (selection.Count > 0) + { + yield return new DropdownOption((Action)ConvertToEmbed, "Selection/To Embed Subgraph"); + yield return new DropdownOption((Action)ConvertToMacro, "Selection/To Macro Subgraph"); + } + } + } + + private void ConvertToEmbed() + { + NodeSelection.Convert(GraphSource.Embed); + } + + private void ConvertToMacro() + { + NodeSelection.Convert(GraphSource.Macro); + } + + private void ReplaceUnit() + { + UnitWidgetHelper.ReplaceUnit(unit, reference, context, selection, e); + } + + #endregion + + + public static class Styles + { + static Styles() + { + // Disabling word wrap because Unity's CalcSize and CalcHeight + // are broken w.r.t. pixel-perfection and matrix + + title = new GUIStyle(BoltCore.Styles.nodeLabel); + title.padding = new RectOffset(0, 5, 0, 2); + title.margin = new RectOffset(0, 0, 0, 0); + title.fontSize = 12; + title.alignment = TextAnchor.MiddleLeft; + title.wordWrap = false; + + surtitle = new GUIStyle(BoltCore.Styles.nodeLabel); + surtitle.padding = new RectOffset(0, 5, 0, 0); + surtitle.margin = new RectOffset(0, 0, 0, 0); + surtitle.fontSize = 10; + surtitle.alignment = TextAnchor.MiddleLeft; + surtitle.wordWrap = false; + + subtitle = new GUIStyle(surtitle); + subtitle.padding.bottom = 2; + + titleInverted = new GUIStyle(title); + titleInverted.normal.textColor = ColorPalette.unityBackgroundDark; + + surtitleInverted = new GUIStyle(surtitle); + surtitleInverted.normal.textColor = ColorPalette.unityBackgroundDark; + + subtitleInverted = new GUIStyle(subtitle); + subtitleInverted.normal.textColor = ColorPalette.unityBackgroundDark; + +#if NEW_UNIT_STYLE + if (EditorGUIUtility.isProSkin) + { + portsBackground = new GUIStyle + { + padding = new RectOffset(0, 0, 6, 5), + border = new RectOffset(0, 0, 2, 2) + }; + + portsBackground.normal.background = CommunityStyles.MakeBorderedTexture(CommunityStyles.backgroundColor, CommunityStyles.backgroundColor.Darken(0.05f)); + } + else + { + portsBackground = new GUIStyle + { + normal = { background = CommunityStyles.MakeBorderedTexture(CommunityStyles.backgroundColor, CommunityStyles.backgroundColor.Brighten(0.05f)) }, + padding = new RectOffset(0, 0, 6, 5) + }; + } +#else + portsBackground = VisualScripting.UnitWidget.Styles.portsBackground; +#endif + settingLabel = new GUIStyle(BoltCore.Styles.nodeLabel); + settingLabel.padding.left = 0; + settingLabel.padding.right = 5; + settingLabel.wordWrap = false; + settingLabel.clipping = TextClipping.Clip; + } + + public static readonly GUIStyle title; + + public static readonly GUIStyle surtitle; + + public static readonly GUIStyle subtitle; + + public static readonly GUIStyle titleInverted; + + public static readonly GUIStyle surtitleInverted; + + public static readonly GUIStyle subtitleInverted; + + public static readonly GUIStyle settingLabel; + + public static readonly float spaceAroundLineIcon = 5; + + public static readonly float spaceBeforePorts = 4; +#if NEW_UNIT_STYLE + public static readonly float spaceBeforeControlOutputs = 6; + + public static readonly float spaceAfterControlInputs = 20; +#else + public static readonly float spaceBeforeControlOutputs = 5; + public static readonly float spaceAfterControlInputs = 17; +#endif + public static readonly float spaceBetweenInputsAndOutputs = 8; + + public static readonly float spaceBeforeSettings = 2; + + public static readonly float spaceBetweenSettings = 3; + + public static readonly float spaceBetweenPorts = 3; + + public static readonly float spaceAfterSettings = 0; + + public static readonly float maxSettingsWidth = 150; + + public static readonly GUIStyle portsBackground; + + public static readonly float iconSize = 24f; + + public static readonly float iconsSize = IconSize.Small; + + public static readonly float iconsSpacing = 3; + + public static readonly int iconsPerColumn = 2; + + public static readonly float spaceAfterIcon = 3; + + public static readonly float spaceAfterSurtitle = 1; + + public static readonly float spaceBeforeSubtitle = 0; + + public static readonly float invokeFadeDuration = 0.5f; + } + } +} +#endif \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitWidget.cs.meta b/Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/VerticalUnitWidget.cs.meta similarity index 100% rename from Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/UnitWidget.cs.meta rename to Editor/Nodes/Fundamentals/Widgets/PatchedWidgets/VerticalUnitWidget.cs.meta diff --git a/Editor/Nodes/Fundamentals/Widgets/SomeValueWidget.cs b/Editor/Nodes/Fundamentals/Widgets/SomeValueWidget.cs index dda4f866..eeacaae4 100644 --- a/Editor/Nodes/Fundamentals/Widgets/SomeValueWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/SomeValueWidget.cs @@ -16,11 +16,5 @@ protected override NodeColorMix baseColor return new NodeColorMix() { red = 0.6578709f, green = 1f }; } } - -#if NEW_UNIT_STYLE - protected override bool isSpecialPortsColor => true; - - protected override Color? PortsbackgroundColor => new Color(1f, 0.32f, 0.1f); -#endif } } \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Widgets/StuffHappensWidget.cs b/Editor/Nodes/Fundamentals/Widgets/StuffHappensWidget.cs index 370bf9c7..4a98899f 100644 --- a/Editor/Nodes/Fundamentals/Widgets/StuffHappensWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/StuffHappensWidget.cs @@ -17,11 +17,5 @@ protected override NodeColorMix baseColor return new NodeColorMix() { red = 0.6578709f, green = 1f }; } } - -#if NEW_UNIT_STYLE - protected override bool isSpecialPortsColor => true; - - protected override Color? PortsbackgroundColor => new Color(1f, 0.32f, 0.1f); -#endif } } \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Widgets/TodoWidget.cs b/Editor/Nodes/Fundamentals/Widgets/TodoWidget.cs index d0f36549..4111aca6 100644 --- a/Editor/Nodes/Fundamentals/Widgets/TodoWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/TodoWidget.cs @@ -16,10 +16,5 @@ protected override NodeColorMix baseColor return new NodeColorMix() { red = 0.6578709f, green = 1f }; } } -#if NEW_UNIT_STYLE - protected override bool isSpecialPortsColor => true; - - protected override Color? PortsbackgroundColor => new Color(1f, 0.32f, 0.1f); -#endif } } \ No newline at end of file diff --git a/Editor/Nodes/Fundamentals/Widgets/ValueRerouteWidget.cs b/Editor/Nodes/Fundamentals/Widgets/ValueRerouteWidget.cs index 690708fa..64713566 100644 --- a/Editor/Nodes/Fundamentals/Widgets/ValueRerouteWidget.cs +++ b/Editor/Nodes/Fundamentals/Widgets/ValueRerouteWidget.cs @@ -25,9 +25,9 @@ public ValueRerouteWidget(FlowCanvas canvas, ValueReroute unit) : base(canvas, u var data = copyDataList.FirstOrDefault(d => d.copyID == unit.copyID); if (data != null && unit.isCopying) { - if (unit.hideConnection && data.sourceConnection != null && data.graph == unit.graph) + var source = data.sourceConnection?.source; + if (unit.hideConnection && data.sourceConnection != null && unit.input.CanValidlyConnectTo(source)) { - var source = data.sourceConnection.source; unit.input.ValidlyConnectTo(source); } } @@ -65,9 +65,42 @@ public override void ExpandCopyGroup(HashSet copyGroup) base.ExpandCopyGroup(copyGroup); } - +#if NEW_UNIT_UI + protected override IEnumerable SnapTargets + { + get + { + foreach (var target in base.SnapTargets) + { + yield return target; + + if (target is IUnit unit) + { + foreach (var port in unit.validPorts.OfType()) + { + yield return port; + } + } + } + } + } +#endif private bool isPortal => unit.hideConnection && unit.input.hasValidConnection; + private static GUIStyle _labelStyle; + + private static GUIStyle labelStyle + { + get + { + _labelStyle ??= new GUIStyle(EditorStyles.label) + { + clipping = TextClipping.Overflow + }; + + return _labelStyle; + } + } public override void DrawForeground() { var inputHasConnection = inputs[0].port.hasAnyConnection; @@ -81,25 +114,23 @@ public override void DrawForeground() if (isSelected || mouseIsOver || !inputHasConnection || !outputHasConnection || unit.hideConnection) { var width = 26f; - var height = _position.height - 4; + var height = _position.height - 8; UnitPortDescription inputDescription = null; if (isPortal) { inputDescription = unit.input.connection.source.Description(); width = UnitPortWidget.Styles.label.CalcSize(inputDescription.ToGUIContent(IconSize.Small)).x + 50f; } - _position.width = width; GraphGUI.Node(new Rect(position.x, position.y + 3, width, height), NodeShape.Square, color, isSelected); - +#if NEW_UNIT_STYLE + const float yPadding = 5; +#else + const float yPadding = 7; +#endif if (inputDescription != null) - GUI.Label(new Rect(position.x + 24, position.y + 5, width, height), inputDescription.label); - } - else - { - _position.width = -19; + GUI.Label(new Rect(position.x + 24, position.y + yPadding, width, height), inputDescription.label, labelStyle); } #endif - Reposition(); } @@ -137,17 +168,26 @@ public override void CachePosition() if (isPortal) { _position.width = VisualScripting.UnitPortWidget.Styles.label.CalcSize(inputPort.connection.source.Description().ToGUIContent(IconSize.Small)).x + 50f; - _position.height = EditorGUIUtility.singleLineHeight; } else { - _position.width = !inputHasConnection || !outputHasConnection || isSelected || mouseIsOver || unit.hideConnection ? 26 : -25; + _position.width = !inputHasConnection || !outputHasConnection || isSelected || mouseIsOver || unit.hideConnection ? 26 : -24; #endif - _position.height = 20; } - inputs[0].y = _position.y + 5; - outputs[0].y = _position.y + 5; +#if NEW_UNIT_STYLE + _position.height = EditorGUIUtility.singleLineHeight; +#else + _position.height = EditorGUIUtility.singleLineHeight + 6f; +#endif + +#if NEW_UNIT_STYLE + inputs[0].y = _position.y + 2; + outputs[0].y = _position.y + 2; +#else + inputs[0].y = _position.y + 6f; + outputs[0].y = _position.y + 6f; +#endif if (valueIcon == null && (inputPort.Descriptor()).description.icon != null) valueIcon = ((UnitPortDescriptor)inputPort.Descriptor()).description.icon; diff --git a/Editor/ProjectSettings/ProjectSettingsProviderView.cs b/Editor/ProjectSettings/ProjectSettingsProviderView.cs index f118e814..b27e7e24 100644 --- a/Editor/ProjectSettings/ProjectSettingsProviderView.cs +++ b/Editor/ProjectSettings/ProjectSettingsProviderView.cs @@ -14,7 +14,6 @@ internal class ProjectSettingsProviderView : SettingsProvider public const string NewToolbarKey = "Community_Settings_NewToolbar"; public const string GraphMinimapKey = "Community_Settings_GraphMinimap"; - public const string DarkerUIKey = "Community_Settings_DarkerUI"; public const string NewVariablesUIKey = "Community_Settings_NewVariablesUI"; public const string ShowVariablesQuickbarKey = "Community_Settings_ShowVariablesQuickbar"; public const string NewListUIKey = "Community_Settings_NewListUI"; @@ -27,7 +26,6 @@ internal class ProjectSettingsProviderView : SettingsProvider private bool _unitStyle; private bool _newToolbar; private bool _graphMinimap; - private bool _darkerUI; private bool _newVariablesUI; private bool _showVariablesQuickbar; private bool _newListUI; @@ -38,7 +36,6 @@ internal class ProjectSettingsProviderView : SettingsProvider private bool _originalUnitStyle; private bool _originalNewToolbar; private bool _originalGraphMinimap; - private bool _originalDarkerUI; private bool _originalNewVariablesUI; private bool _originalShowVariablesQuickbar; private bool _originalNewListUI; @@ -106,7 +103,6 @@ public override void OnGUI(string searchContext) GUILayout.Space(10); GUILayout.Label("UI", EditorStyles.boldLabel); - DrawToggle("Darker UI", ref _darkerUI); DrawToggle("New Variables UI", ref _newVariablesUI); EditorGUI.BeginDisabledGroup(!_newVariablesUI); @@ -130,7 +126,6 @@ private void LoadValues() _originalNewToolbar = _newToolbar = EditorPrefs.GetBool(NewToolbarKey, false); _originalGraphMinimap = _graphMinimap = EditorPrefs.GetBool(GraphMinimapKey, false); - _originalDarkerUI = _darkerUI = EditorPrefs.GetBool(DarkerUIKey, false); _originalNewVariablesUI = _newVariablesUI = EditorPrefs.GetBool(NewVariablesUIKey, false); _originalShowVariablesQuickbar = _showVariablesQuickbar = EditorPrefs.GetBool(ShowVariablesQuickbarKey, false); _originalNewListUI = _newListUI = EditorPrefs.GetBool(NewListUIKey, false); @@ -145,7 +140,6 @@ private bool HasPendingChanges() _unitStyle != _originalUnitStyle || _newToolbar != _originalNewToolbar || _graphMinimap != _originalGraphMinimap || - _darkerUI != _originalDarkerUI || _newVariablesUI != _originalNewVariablesUI || _showVariablesQuickbar != _originalShowVariablesQuickbar || _newListUI != _originalNewListUI || @@ -211,7 +205,6 @@ private void ApplyAllChanges() } EditorPrefs.SetBool(NewToolbarKey, _newToolbar); EditorPrefs.SetBool(GraphMinimapKey, _graphMinimap); - EditorPrefs.SetBool(DarkerUIKey, _darkerUI); EditorPrefs.SetBool(NewVariablesUIKey, _newVariablesUI); EditorPrefs.SetBool(ShowVariablesQuickbarKey, _showVariablesQuickbar); EditorPrefs.SetBool(NewListUIKey, _newListUI); @@ -222,7 +215,6 @@ private void ApplyAllChanges() ScriptingDefineUtility.UpdateUnitStyle(); ScriptingDefineUtility.UpdateToolbarStyle(); ScriptingDefineUtility.UpdateGraphMiniMap(); - ScriptingDefineUtility.UpdateDarkUI(); ScriptingDefineUtility.UpdateVariablesUI(); ScriptingDefineUtility.UpdateListUI(); ScriptingDefineUtility.UpdateDictionaryUI(); @@ -233,7 +225,6 @@ private void ApplyAllChanges() _originalNewToolbar = _newToolbar; _originalGraphMinimap = _graphMinimap; - _originalDarkerUI = _darkerUI; _originalNewVariablesUI = _newVariablesUI; _originalShowVariablesQuickbar = _showVariablesQuickbar; _originalNewListUI = _newListUI; @@ -247,7 +238,6 @@ private void ResetToDefaults() _unitStyle = false; _newToolbar = false; _graphMinimap = false; - _darkerUI = false; _newVariablesUI = false; _showVariablesQuickbar = false; _newListUI = false; diff --git a/Editor/Shared/Utility/CommunityStyles.cs b/Editor/Shared/Utility/CommunityStyles.cs index 0b6e49b3..57c534b7 100644 --- a/Editor/Shared/Utility/CommunityStyles.cs +++ b/Editor/Shared/Utility/CommunityStyles.cs @@ -1,8 +1,10 @@ #pragma warning disable using System; using System.Collections; +using System.Linq; using Unity.VisualScripting; using Unity.VisualScripting.Community.Libraries.Humility; +using Unity.VisualScripting.ReorderableList; using UnityEditor; using UnityEngine; @@ -37,6 +39,12 @@ public static class CommunityStyles public static readonly Texture2D DragHandleTexture; public static readonly Texture2D RemoveItemTexture; + public static readonly Texture2D controlPortUnconnected; + public static readonly Texture2D controlPortConnected; + public static readonly Texture2D valuePortUnconnected; + public static readonly Texture2D valuePortConnected; + public static readonly Texture2D valuePortalConnection; + private static GUIStyle toolbarButton; internal static Texture2D toolbarButtonNormalTex; private static Texture2D toolbarButtonHoverTex; @@ -46,6 +54,10 @@ public static class CommunityStyles private static Texture2D sidebarAnchorButtonHoverTex; private static bool lastProSkin; + public static readonly float relativeBend = 0.5f; + public static readonly float minBend = 20f; + public static readonly float connectionThickness = 3f; + public static GUIStyle ToolbarButton { get @@ -166,7 +178,7 @@ public static GUIStyle SidebarAnchorButton static CommunityStyles() { - backgroundColor = Unity.VisualScripting.ColorPalette.unityBackgroundMid.color.Darken(0.05f); + backgroundColor = Unity.VisualScripting.ColorPalette.unityBackgroundMid.color; foldoutBackgroundColor = Unity.VisualScripting.ColorPalette.unityBackgroundDark.color.Darken(0.02f); foldoutHeaderColor = Unity.VisualScripting.ColorPalette.unityBackgroundDark.color.Darken(0.05f); @@ -190,6 +202,12 @@ static CommunityStyles() var sidebarAnchorButtonBg = CommunityStyles.backgroundColor; var sidebarAnchorButtonBorder = EditorGUIUtility.isProSkin ? CommunityStyles.backgroundColor.Darken(0.05f) : CommunityStyles.backgroundColor.Brighten(0.05f); sidebarAnchorButtonBackground = MakeBorderedTexture(headerBg, border, BorderSide.LeftRight | BorderSide.Top); + + controlPortConnected = PathUtil.Load("ConnectedHandle", CommunityEditorPath.Fundamentals)?[12]; + controlPortUnconnected = PathUtil.Load("UnconnectedHandle", CommunityEditorPath.Fundamentals)?[12]; + valuePortConnected = PathUtil.Load("ValuePortConnected", CommunityEditorPath.Fundamentals)?[12]; + valuePortUnconnected = PathUtil.Load("ValuePortUnconnected", CommunityEditorPath.Fundamentals)?[12]; + valuePortalConnection = PathUtil.Load("PortalConnectionIn", CommunityEditorPath.Fundamentals)?[16]; } public static Texture2D MakeBorderedTexture(Color background, Color border, BorderSide borderSides = BorderSide.TopBottom, int width = 32, int height = 32, int borderThickness = 1) @@ -232,15 +250,23 @@ public static Texture2D MakeBorderedTexture(Color background, Color border, Bord return tex; } - private static string[] preferredNames = new string[] { "key", "title", "id", "label", "name" }; + public static bool TitleFoldout(Rect position, bool isExpanded, GUIContent title) + { + if (Event.current.type == EventType.Repaint) + { + ReorderableListStyles.Title.Draw(position, "", false, false, false, false); + } + + position.x += 16; + + return EditorGUI.Foldout(position, isExpanded, title, true); + } + + private static readonly string[] preferredNames = { "key", "title", "id", "label", "name" }; /// /// Get the display name for metadata when in a collection. /// - /// The metadata - /// The metadata index in the collection - /// If the value is primitive use the value as the display name if none other can be resolved. - /// The GUIContent with the Name and Icon public static GUIContent GetCollectionDisplayName(Metadata element, int index, bool valueAsFallback = false) { object value = element?.value; @@ -251,6 +277,8 @@ public static GUIContent GetCollectionDisplayName(Metadata element, int index, b if (value is string s && !string.IsNullOrEmpty(s)) return new GUIContent(s, typeof(string).Icon()?[IconSize.Small]); + Type valueType = value.GetType(); + if (value is Type type) { return new GUIContent(type.DisplayName(), type.Icon()?[IconSize.Small]); @@ -258,15 +286,14 @@ public static GUIContent GetCollectionDisplayName(Metadata element, int index, b if (value is UnityEngine.Object uobj) { - if (uobj is UnityEngine.Object uv) - { - if (uv is IEventMachine machine) - return new GUIContent(GetMachineName(machine), machine.GetType().Icon()?[IconSize.Small]); - else if (uv is IMacro macro) - return new GUIContent(GetMacroName(macro), macro.GetType().Icon()?[IconSize.Small]); - else if (!string.IsNullOrEmpty(uv.name)) - return new GUIContent(uv.name, uv.GetType().Icon()?[IconSize.Small]); - } + if (uobj is IEventMachine machine) + return new GUIContent(GetMachineName(machine), machine.GetType().Icon()?[IconSize.Small]); + + if (uobj is IMacro macro) + return new GUIContent(GetMacroName(macro), macro.GetType().Icon()?[IconSize.Small]); + + if (!string.IsNullOrEmpty(uobj.name)) + return new GUIContent(uobj.name, uobj.GetType().Icon()?[IconSize.Small]); } if (value is ICollection collection) @@ -274,6 +301,8 @@ public static GUIContent GetCollectionDisplayName(Metadata element, int index, b return new GUIContent($"{collection.GetType().DisplayName()} [{collection.Count}]", collection.GetType().Icon()?[IconSize.Small]); } + Texture icon = valueType.Icon()?[IconSize.Small]; + object TryGetMemberValue(string memberName) { try @@ -292,7 +321,6 @@ object TryGetMemberValue(string memberName) var mv = TryGetMemberValue(pref); if (mv != null) { - var icon = value.GetType().Icon()?[IconSize.Small]; if (mv is UnityEngine.Object uv) { if (uv is IEventMachine machine) @@ -308,24 +336,25 @@ object TryGetMemberValue(string memberName) } } - if (valueAsFallback && value.GetType().IsBasic()) + if (valueAsFallback && valueType.IsBasic()) { - return new GUIContent(value.ToString(), value.GetType().Icon()?[IconSize.Small]); + return new GUIContent(value.ToString(), icon); } - return new GUIContent($"Value {index + 1}", value.GetType().Icon()?[IconSize.Small]); + return new GUIContent($"Value {index + 1}", icon); } public static string GetMachineName(IEventMachine machine) { - if (!string.IsNullOrEmpty(machine?.GetReference()?.graph?.title)) + var graphTitle = machine?.GetReference()?.graph?.title; + if (!string.IsNullOrEmpty(graphTitle)) { - return machine.GetReference().graph.title; + return graphTitle; } - if (machine.nest.source == GraphSource.Macro && machine.nest.macro is UnityEngine.Object @object) + if (machine.nest.source == GraphSource.Macro && machine.nest.macro is UnityEngine.Object obj) { - if (!string.IsNullOrEmpty(@object.name)) return $"{@object.name}"; + if (!string.IsNullOrEmpty(obj.name)) return obj.name; } return "Unnamed Machine"; @@ -333,14 +362,15 @@ public static string GetMachineName(IEventMachine machine) public static string GetMacroName(IMacro macro) { - if (!string.IsNullOrEmpty(macro?.GetReference()?.graph?.title)) + var graphTitle = macro?.GetReference()?.graph?.title; + if (!string.IsNullOrEmpty(graphTitle)) { - return macro.GetReference().graph.title; + return graphTitle; } - if (macro is UnityEngine.Object @object) + if (macro is UnityEngine.Object obj) { - return @object.name; + return obj.name; } return "Unnamed Macro"; diff --git a/Editor/Shared/Utility/GraphTraversal.cs b/Editor/Shared/Utility/GraphTraversal.cs index 7b9b3a33..db6beecb 100644 --- a/Editor/Shared/Utility/GraphTraversal.cs +++ b/Editor/Shared/Utility/GraphTraversal.cs @@ -197,6 +197,23 @@ public static string GetNesterStateTransitionName(INesterStateTransition nester) else return $"Embed {nester.GetType().Name}"; } + public static string GetNesterName(IGraphNesterElement nester) + { + if (nester is INesterUnit nesterUnit) return GetNesterUnitName(nesterUnit); + else if (nester is INesterState nesterState) return GetNesterStateName(nesterState); + else if (nester is INesterStateTransition nesterStateTransition) return GetNesterStateTransitionName(nesterStateTransition); + + if (!string.IsNullOrEmpty(nester.nest.graph.title)) + { + return nester.nest.graph.title; + } + else if (nester.nest.source == GraphSource.Macro && nester.nest.macro is Object @object) + { + return @object.name; + } + else return $"Embed {nester.GetType().Name}"; + } + public static void TraverseGraph(IGraph graph, System.Action visit) { if (graph == null || visit == null) return; diff --git a/Editor/Shared/Utility/GraphUtility.cs b/Editor/Shared/Utility/GraphUtility.cs index 27464b72..39b6926e 100644 --- a/Editor/Shared/Utility/GraphUtility.cs +++ b/Editor/Shared/Utility/GraphUtility.cs @@ -729,5 +729,133 @@ public static void UpdateAllSceneVariables(Scene scene, string oldName, string n } Undo.CollapseUndoOperations(group); } + + /// + /// + /// : The kind of variable to look for when renaming. Excludes Flow variables see: + /// + /// + /// : The current name of the variable, this is what it searches for. + /// + /// + /// : The new name to replace the old name with. + /// + /// + /// : The metadata of the field. + /// + /// + public static void RenameVariables(VariableKind kind, string oldName, string newName, Metadata metadata) + { + switch (kind) + { + case VariableKind.Graph: + if (EditorWindow.focusedWindow == GraphWindow.active) + UpdateAllGraphVariables((FlowGraph)GraphWindow.activeContext.graph, oldName, newName); + else if (VariablesWindow.isVariablesWindowContext && VariablesWindow.currentContext != null) + UpdateAllGraphVariables((FlowGraph)VariablesWindow.currentContext.graph, oldName, newName); + break; + case VariableKind.Object: + { + var ancestor = metadata.Ancestor(m => m.value is VisualScripting.Variables); + if (ancestor != null && ancestor.value != null) + { + var gameObject = (ancestor.value as VisualScripting.Variables).gameObject; + UpdateAllObjectVariables(gameObject, oldName, newName); + } + else if (EditorWindow.focusedWindow == GraphWindow.active && GraphWindow.activeReference != null) + { + if (GraphWindow.activeReference.gameObject != null) + UpdateAllObjectVariables(GraphWindow.activeReference.gameObject, oldName, newName); + } + } + break; + case VariableKind.Scene: + { + var ancestor = metadata.Ancestor(m => m.value is VisualScripting.Variables); + if (ancestor != null && ancestor.value != null) + { + var scene = (ancestor.value as VisualScripting.Variables).gameObject.scene; + UpdateAllSceneVariables(scene, oldName, newName); + } + else if (EditorWindow.focusedWindow == GraphWindow.active && GraphWindow.activeReference != null) + { + if (GraphWindow.activeReference.scene != null) + UpdateAllSceneVariables(GraphWindow.activeReference.scene.Value, oldName, newName); + else + { + Scene? current = null; + for (int i = 0; i < SceneManager.sceneCount; i++) + { + var scene = SceneManager.GetSceneAt(i); + if (!scene.isLoaded) continue; + + var variables = VisualScripting.Variables.Scene(scene); + + if (variables == metadata.parent.value) + { + current = scene; + break; + } + } + + if (current == null) + { + Debug.LogWarning( + $"[Rename Variables] Could not find the scene that this variable is in please ensure that the scene is valid and loaded." + ); + break; + } + + UpdateAllSceneVariables(current.Value, oldName, newName); + } + } + } + break; + case VariableKind.Application: + { + if (Application.isPlaying) + { + Debug.LogWarning($"[Rename Variables] Cannot rename all Application variables while in play mode!"); + break; + } + bool choice = EditorUtility.DisplayDialog( + "Update ALL Application Variables?", + "This will go through ALL scenes and macros to find every Variable Unit " + + $"using {oldName} and update it to {newName}.\n\n" + + "This operation is FINAL and cannot be undone!", + "Update All", + "Rename Only" + ); + + if (choice) + { + RenameApplicationVariables(oldName, newName); + } + } + break; + case VariableKind.Saved: + { + if (Application.isPlaying) + { + Debug.LogWarning($"[Rename Variables] Cannot rename all Saved variables while in play mode!"); + break; + } + bool choice = EditorUtility.DisplayDialog( + "Update ALL Saved Variables?", + "This will go through ALL scenes and macros to find every Variable Unit " + + $"using {oldName} and update it to {newName}.\n\n" + + "This operation is FINAL and cannot be undone!", + "Update All", + "Rename Only" + ); + + if (choice) + { + RenameSavedVariables(oldName, newName); + } + } + break; + } + } } } \ No newline at end of file diff --git a/Editor/Shared/Utility/RectUtility.cs b/Editor/Shared/Utility/RectUtility.cs index 1ebf2ecd..238637c2 100644 --- a/Editor/Shared/Utility/RectUtility.cs +++ b/Editor/Shared/Utility/RectUtility.cs @@ -1,153 +1,153 @@ -using UnityEngine; +using System; using System.Collections.Generic; +using UnityEngine; namespace Unity.VisualScripting.Community { public static class RectUtility { + public struct SnapLine + { + public Vector2 start; + public Vector2 end; + } + public struct SnapResult { - public bool snapped; + public bool snappedX; + public bool snappedY; public Vector2 snapPosition; - public List snapLines; - - public struct Line - { - public Vector2 start; - public Vector2 end; - } + + public bool hasVerticalLine; + public SnapLine verticalLine; + + public bool hasHorizontalLine; + public SnapLine horizontalLine; + + public bool snapped => snappedX || snappedY; } public static SnapResult CheckSnap(Rect current, List others, float threshold = 5f) { SnapResult result = new SnapResult { - snapped = false, - snapPosition = current.position, - snapLines = new List() + snapPosition = current.position }; - Vector2 newPos = current.position; + float bestXDist = threshold; + float bestYDist = threshold; - SnapResult.Line? closestHorizontalLine = null; - float closestHorizontalDistance = float.MaxValue; + float deltaX = 0f; + float deltaY = 0f; - SnapResult.Line? closestVerticalLine = null; - float closestVerticalDistance = float.MaxValue; + int bestXTargetIdx = -1; + int bestYTargetIdx = -1; + float bestXValue = 0f; + float bestYValue = 0f; - foreach (var target in others) + for (int i = 0; i < others.Count; i++) { + Rect target = others[i]; if (target == current) continue; - float[] currentX = { current.xMin, current.center.x, current.xMax }; - float[] targetX = { target.xMin, target.center.x, target.xMax }; - - for (int ci = 0; ci < currentX.Length; ci++) + for (int ci = 0; ci < 3; ci++) { - for (int ti = 0; ti < targetX.Length; ti++) + float cx = GetXPoint(current, ci); + for (int ti = 0; ti < 3; ti++) { - float cx = currentX[ci]; - float tx = targetX[ti]; + float tx = GetXPoint(target, ti); float dist = Mathf.Abs(cx - tx); - if (dist <= threshold && dist < closestHorizontalDistance) + if (dist < bestXDist) { - closestHorizontalDistance = dist; - float deltaX = tx - cx; - - Rect moved = current; - moved.position += new Vector2(deltaX, 0); - - newPos.x = moved.x; - - float yStart = Mathf.Max(moved.yMin, target.yMin); - float yEnd = Mathf.Min(moved.yMax, target.yMax); - - if (yStart > yEnd) - { - if (moved.center.y < target.center.y) - { - yStart = moved.yMax; - yEnd = target.yMin; - } - else - { - yStart = target.yMax; - yEnd = moved.yMin; - } - } - - closestHorizontalLine = new SnapResult.Line - { - start = new Vector2(tx, yStart), - end = new Vector2(tx, yEnd) - }; + bestXDist = dist; + deltaX = tx - cx; + bestXTargetIdx = i; + bestXValue = tx; } } } - float[] currentY = { current.yMin, current.center.y, current.yMax }; - float[] targetY = { target.yMin, target.center.y, target.yMax }; - - for (int ci = 0; ci < currentY.Length; ci++) + for (int ci = 0; ci < 3; ci++) { - for (int ti = 0; ti < targetY.Length; ti++) + float cy = GetYPoint(current, ci); + for (int ti = 0; ti < 3; ti++) { - float cy = currentY[ci]; - float ty = targetY[ti]; + float ty = GetYPoint(target, ti); float dist = Mathf.Abs(cy - ty); - if (dist <= threshold && dist < closestVerticalDistance) + if (dist < bestYDist) { - closestVerticalDistance = dist; - float deltaY = ty - cy; - - Rect moved = current; - moved.position += new Vector2(0, deltaY); - - newPos.y = moved.y; - - float xStart = Mathf.Max(moved.xMin, target.xMin); - float xEnd = Mathf.Min(moved.xMax, target.xMax); - - if (xStart > xEnd) - { - if (moved.center.x < target.center.x) - { - xStart = moved.xMax; - xEnd = target.xMin; - } - else - { - xStart = target.xMax; - xEnd = moved.xMin; - } - } - - closestVerticalLine = new SnapResult.Line - { - start = new Vector2(xStart, ty), - end = new Vector2(xEnd, ty) - }; + bestYDist = dist; + deltaY = ty - cy; + bestYTargetIdx = i; + bestYValue = ty; } } } } - if (closestHorizontalLine.HasValue) + if (bestXTargetIdx != -1) + { + result.snappedX = true; + result.snapPosition.x += deltaX; + } + + if (bestYTargetIdx != -1) + { + result.snappedY = true; + result.snapPosition.y += deltaY; + } + + result.snapPosition = result.snapPosition.PixelPerfect(); + + Rect snappedRect = new Rect(result.snapPosition, current.size); + + if (bestXTargetIdx != -1) { - result.snapLines.Add(closestHorizontalLine.Value); - result.snapped = true; + Rect target = others[bestXTargetIdx]; + result.hasVerticalLine = true; + + float yMin = Mathf.Min(snappedRect.yMin, target.yMin); + float yMax = Mathf.Max(snappedRect.yMax, target.yMax); + + result.verticalLine = new SnapLine + { + start = new Vector2(bestXValue, yMin), + end = new Vector2(bestXValue, yMax) + }; } - if (closestVerticalLine.HasValue) + if (bestYTargetIdx != -1) { - result.snapLines.Add(closestVerticalLine.Value); - result.snapped = true; + Rect target = others[bestYTargetIdx]; + result.hasHorizontalLine = true; + + float xMin = Mathf.Min(snappedRect.xMin, target.xMin); + float xMax = Mathf.Max(snappedRect.xMax, target.xMax); + + result.horizontalLine = new SnapLine + { + start = new Vector2(xMin, bestYValue), + end = new Vector2(xMax, bestYValue) + }; } - result.snapPosition = newPos.PixelPerfect(); return result; } + + private static float GetXPoint(in Rect r, int index) => index switch + { + 0 => r.xMin, + 1 => r.center.x, + _ => r.xMax + }; + + private static float GetYPoint(in Rect r, int index) => index switch + { + 0 => r.yMin, + 1 => r.center.y, + _ => r.yMax + }; } } \ No newline at end of file diff --git a/Editor/Windows/SurroundWithWindow.cs b/Editor/Windows/SurroundWithWindow.cs index 80d17761..6fa3c556 100644 --- a/Editor/Windows/SurroundWithWindow.cs +++ b/Editor/Windows/SurroundWithWindow.cs @@ -2,16 +2,18 @@ using System.Collections; using System.Collections.Generic; using System.Linq; +using System.Reflection; using Unity.VisualScripting.Community.Libraries.Humility; using UnityEditor; using UnityEngine; +using UnityEngine.Assemblies; namespace Unity.VisualScripting.Community { public class SurroundWithWindow : EditorWindow { private static List surroundCommands; - public static Action onCommandSelected {get; private set; } + public static Action onCommandSelected { get; private set; } private bool positionSet; private Vector2 mousePosition; @@ -24,7 +26,14 @@ public static SurroundWithWindow ShowWindow(Action onCommandSel { var window = CreateInstance(); SurroundWithWindow.onCommandSelected = onCommandSelected; - surroundCommands = AppDomain.CurrentDomain.GetAssemblies() + +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else + Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif + + surroundCommands = assemblies .SelectMany(assembly => assembly.GetTypes()) .Where(type => typeof(ISurroundWithCommandBase).IsAssignableFrom(type) && !type.IsAbstract && !type.IsInterface) .ToList(); diff --git a/Editor/Windows/TypeBuilderWindow.cs b/Editor/Windows/TypeBuilderWindow.cs index 06cb12b2..7e96bcb6 100644 --- a/Editor/Windows/TypeBuilderWindow.cs +++ b/Editor/Windows/TypeBuilderWindow.cs @@ -21,14 +21,22 @@ public class TypeBuilderWindow : EditorWindow private Action result; private Action onBeforeChanged; private Action onAfterChanged; - List fakeGenericParameterTypes = new List(); + private List fakeGenericParameterTypes = new List(); + public static TypeBuilderWindow Window { get; private set; } private static Metadata targetMetadata; - private bool canMakeArrayTypeForBaseType; - static GUIStyle popupStyle; - static GUIContent sharedContent = new GUIContent(); + private bool triggerDropdownOnOpen; + + private static GUIStyle popupStyle; + private static readonly GUIContent sharedContent = new GUIContent(); + + private const float DefaultHeight = 320f; + private const float MinWidth = 500f; + private const float MaxWidth = 1000f; + + private static readonly Dictionary<(GenericParameterAttributes, Type[]), Type[]> constraintCache = new Dictionary<(GenericParameterAttributes, Type[]), Type[]>(); public static bool Button(Type type, string nullType = "Select Type", TextAnchor textAnchor = TextAnchor.MiddleLeft, params GUILayoutOption[] options) { @@ -53,16 +61,7 @@ public static void ShowWindow( Action onBeforeChanged = null, Action onAfterChanged = null) { - ShowWindowInternal( - position, - meta, - null, - meta != null ? meta.value as Type : null, - canMakeArray, - types, - null, - onBeforeChanged, - onAfterChanged); + ShowWindowInternal(position, meta, null, meta?.value as Type, canMakeArray, types, null, onBeforeChanged, onAfterChanged); } public static void ShowWindow( @@ -73,16 +72,7 @@ public static void ShowWindow( Action onBeforeChanged = null, Action onAfterChanged = null) { - ShowWindowInternal( - position, - meta, - null, - meta != null ? meta.value as Type : null, - canMakeArray, - Array.Empty(), - fakeGenericParameterTypes, - onBeforeChanged, - onAfterChanged); + ShowWindowInternal(position, meta, null, meta?.value as Type, canMakeArray, Array.Empty(), fakeGenericParameterTypes, onBeforeChanged, onAfterChanged); } public static void ShowWindow(Rect position, Action result, Type currentType, bool canMakeArray = true, Type[] types = null, Action onBeforeChanged = null, Action onAfterChanged = null) @@ -91,12 +81,12 @@ public static void ShowWindow(Rect position, Action result, Type currentTy } public static void ShowWindow(Rect position, Action result, Type currentType, bool canMakeArray = true, - List fakeGenericParameterTypes = null, Action onBeforeChanged = null, Action onAfterChanged = null) + List fakeGenericParameterTypes = null, Action onBeforeChanged = null, Action onAfterChanged = null) { ShowWindowInternal(position, null, result, currentType, canMakeArray, Array.Empty(), fakeGenericParameterTypes, onBeforeChanged, onAfterChanged); } - static void ShowWindowInternal(Rect position, Metadata meta, Action result, Type currentType, bool canMakeArray, Type[] types, List fakeGenerics, Action onBeforeChanged, Action onAfterChanged) + private static void ShowWindowInternal(Rect position, Metadata meta, Action result, Type currentType, bool canMakeArray, Type[] types, List fakeGenerics, Action onBeforeChanged, Action onAfterChanged) { var window = GetWindow(); @@ -113,7 +103,7 @@ static void ShowWindowInternal(Rect position, Metadata meta, Action result ConfigureWindow(window, position, currentType, types, canMakeArray, onBeforeChanged, onAfterChanged); } - static TypeBuilderWindow GetWindow() + private static TypeBuilderWindow GetWindow() { if (Window == null) { @@ -122,14 +112,16 @@ static TypeBuilderWindow GetWindow() return Window; } - static Type[] MergeAssemblyTypes(IEnumerable extra) + private static Type[] MergeAssemblyTypes(IEnumerable extra) { var baseTypes = Codebase.settingsAssembliesTypes; - var result = new List(baseTypes.Count + 4); + var result = new List(baseTypes.Count + 4) + { + typeof(void), + typeof(Libraries.CSharp.Void) + }; result.AddRange(baseTypes); - result.Add(typeof(void)); - result.Add(typeof(Libraries.CSharp.Void)); if (extra != null) result.AddRange(extra); @@ -137,7 +129,7 @@ static Type[] MergeAssemblyTypes(IEnumerable extra) return result.ToArray(); } - static Type[] FilterBaseTypes(Type[] source) + private static Type[] FilterBaseTypes(Type[] source) { var list = new List(source.Length); for (int i = 0; i < source.Length; i++) @@ -148,10 +140,6 @@ static Type[] FilterBaseTypes(Type[] source) } return list.ToArray(); } - const float DefaultHeight = 320f; - const float MinWidth = 500f; - const float MaxWidth = 1000f; - private bool triggerDropdownOnOpen = false; private static void ConfigureWindow(TypeBuilderWindow window, Rect position, Type type, Type[] types, bool canMakeArray, Action onBeforeChanged, Action onAfterChanged) { @@ -188,7 +176,6 @@ private static void ConfigureWindow(TypeBuilderWindow window, Rect position, Typ private void OnEnable() { triggerDropdownOnOpen = true; - minSize = new Vector2(MinWidth, MaxWidth); titleContent = new GUIContent("Type Builder"); @@ -196,50 +183,40 @@ private void OnEnable() baseTypeLookup = FilterBaseTypes(settingAssemblyTypesLookup); } - private IFuzzyOptionTree GetBaseTypeOptions() - { - return new TypeBuilderTypeOptionTree(customTypeLookup ?? baseTypeLookup); - } + private IFuzzyOptionTree GetBaseTypeOptions() => new TypeBuilderTypeOptionTree(customTypeLookup ?? baseTypeLookup); private IFuzzyOptionTree GetNestedTypeOptions(GenericParameter parameter) { var constrainedTypes = GetConstrainedTypes(parameter); - if (parameter != null && parameter.type.type.IsArray && !constrainedTypes.Contains(parameter.type.type)) constrainedTypes.Append(parameter.type.type); + if (parameter?.type.type != null && parameter.type.type.IsArray && !constrainedTypes.Contains(parameter.type.type)) + { + constrainedTypes = constrainedTypes.Append(parameter.type.type).ToArray(); + } return new TypeBuilderTypeOptionTree(constrainedTypes); } - private Type[] GetConstrainedTypes(GenericParameter genericParameter) + private Type[] GetConstrainedTypes(GenericParameter parameter) { - if (genericParameter.constraints == null && (genericParameter.type.type.IsGenericParameter || genericParameter.type.type is FakeGenericParameterType)) + if (parameter.constraints == null && (parameter.type.type.IsGenericParameter || parameter.type.type is FakeGenericParameterType)) { - var constraints = genericParameter.type.type.GetGenericParameterConstraints(); + var constraints = parameter.type.type.GetGenericParameterConstraints(); if (constraints.Length > 0) { - var constrainedTypes = settingAssemblyTypesLookup - .AsParallel() + parameter.constraints = settingAssemblyTypesLookup .Where(candidateType => constraints.All(constraint => constraint.IsAssignableFrom(candidateType))) .ToArray(); - - genericParameter.constraints = constrainedTypes; - return constrainedTypes; } else { - var attributes = genericParameter.type.type.GenericParameterAttributes; - var constrainedTypes = GetConstraintAttributeTypes(attributes, - !genericParameter.HasParent && customTypeLookup != null - ? customTypeLookup - : settingAssemblyTypesLookup); - - genericParameter.constraints = constrainedTypes; - return constrainedTypes; + var attributes = parameter.type.type.GenericParameterAttributes; + var typesSource = !parameter.HasParent && customTypeLookup != null ? customTypeLookup : settingAssemblyTypesLookup; + parameter.constraints = GetConstraintAttributeTypes(attributes, typesSource); } } - return genericParameter.constraints; + return parameter.constraints; } - private static readonly Dictionary<(GenericParameterAttributes, Type[]), Type[]> constraintCache = new Dictionary<(GenericParameterAttributes, Type[]), Type[]>(); public Type[] GetConstraintAttributeTypes(GenericParameterAttributes attributes, Type[] typesLookup) { var key = (attributes, typesLookup); @@ -251,11 +228,8 @@ public Type[] GetConstraintAttributeTypes(GenericParameterAttributes attributes, var constrainedTypes = typesLookup .Where(candidateType => ((attributes & GenericParameterAttributes.ReferenceTypeConstraint) == 0 || candidateType.IsClass) && - ((attributes & GenericParameterAttributes.NotNullableValueTypeConstraint) == 0 || - (!candidateType.IsNullable() || candidateType.IsStruct())) && - ((attributes & GenericParameterAttributes.DefaultConstructorConstraint) == 0 || - candidateType.GetConstructors(BindingFlags.Public | BindingFlags.NonPublic) - .Any(constructor => constructor.GetParameters().Length == 0)) && + ((attributes & GenericParameterAttributes.NotNullableValueTypeConstraint) == 0 || (!candidateType.IsNullable() || candidateType.IsStruct())) && + ((attributes & GenericParameterAttributes.DefaultConstructorConstraint) == 0 || candidateType.GetConstructors(BindingFlags.Public | BindingFlags.NonPublic).Any(c => c.GetParameters().Length == 0)) && !NameUtility.TypeHasSpecialName(candidateType)) .ToArray(); @@ -265,37 +239,36 @@ public Type[] GetConstraintAttributeTypes(GenericParameterAttributes attributes, private void OnGUI() { - if (Event.current.type == EventType.KeyUp && Event.current.keyCode == KeyCode.Escape) + if (Event.current.type == EventType.KeyUp && Event.current.keyCode == KeyCode.Escape && !IsMouseOverWindow()) { - if (!IsMouseOverWindow()) - { - Close(); - } + Close(); + return; } + HUMEditor.Vertical().Box(HUMEditorColor.DefaultEditorBackground.Darken(0.1f), Color.black, new RectOffset(4, 4, 4, 4), new RectOffset(2, 2, 2, 2), () => { scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition, GUILayout.ExpandWidth(false)); + HUMEditor.Vertical().Box(HUMEditorColor.DefaultEditorBackground, Color.black, new RectOffset(4, 4, 4, 4), new RectOffset(2, 2, 0, 2), () => { EditorGUILayout.LabelField(new GUIContent("Type Builder", typeof(Type).Icon()?[IconSize.Small], "A tool to create and customize types beyond the standard Type Field capabilities"), LudiqStyles.centeredLabel); - var labelWidth = GUI.skin.label.CalcSize(new GUIContent("Select Type")).x; }); - GUIContent inheritButtonContent = new GUIContent( + var inheritButtonContent = new GUIContent( baseType?.As().CSharpName(false, false, false) ?? "Select Type", baseType.GetTypeIcon() ); lastRect = GUILayoutUtility.GetLastRect(); - var buttonWidth = GUI.skin.button.CalcSize(inheritButtonContent).x; - var buttonRect = DrawTypeField(inheritButtonContent, genericParameter, true); + if (triggerDropdownOnOpen && Event.current.type == EventType.Repaint) { triggerDropdownOnOpen = false; TriggerDropdown(buttonRect); } - if (genericParameter != null && genericParameter.type.type.IsGenericType || GetArrayBase(genericParameter.type.type).IsGenericType) + + if (genericParameter != null && (genericParameter.type.type.IsGenericType || GetArrayBase(genericParameter.type.type).IsGenericType)) { var index = 0; foreach (var param in genericParameter.nestedParameters) @@ -306,200 +279,120 @@ private void OnGUI() } EditorGUILayout.EndScrollView(); - var isValid = IsValidType(baseType, true); + + var isValid = IsValidType(baseType); EditorGUI.BeginDisabledGroup(!isValid); - if (!isValid) + + if (!isValid && baseType != null) { - if (baseType != null) - EditorGUILayout.HelpBox($"Can not create arrays of Open Generics, e.g {baseType.As().CSharpName(false, false, false).RemoveHighlights().RemoveMarkdown()} is invalid it has to have a types set for {string.Join(", ", GetInvalidParameters(baseType))}", MessageType.Error); + EditorGUILayout.HelpBox($"Cannot create partially constructed types, e.g. {baseType.As().CSharpName(false, false, false)} is invalid. Types must be set for: {string.Join(", ", GetInvalidParameters(baseType))}", MessageType.Error); } + var e = Event.current; - if (GUILayout.Button("Create Type") || (isValid && e != null && focusedWindow == this && e.type == EventType.KeyDown && Event.current.keyCode == KeyCode.Return)) + if (GUILayout.Button("Create Type") || (isValid && e != null && focusedWindow == this && e.type == EventType.KeyDown && e.keyCode == KeyCode.Return)) { if (targetMetadata != null) ConstructType(targetMetadata); else ConstructType(); + genericParameter.Clear(); Close(); } EditorGUI.EndDisabledGroup(); }); } + private void TriggerDropdown(Rect buttonRect) { int selectedIndex = Array.IndexOf(customTypeLookup ?? baseTypeLookup, typeof(object)); - Type _selected = null; LudiqGUI.FuzzyDropdown(buttonRect, GetBaseTypeOptions(), selectedIndex, (type) => { - _selected = (type as TypeBuilderType).Type; - var genericParams = new GenericParameter(genericParameter, _selected, _selected.Name); - baseType = _selected; + var selectedType = (type as TypeBuilderType).Type; + var genericParams = new GenericParameter(genericParameter, selectedType, selectedType.Name); + baseType = selectedType; genericParameter?.Clear(); - genericParams.AddGenericParameters(_selected); + genericParams.AddGenericParameters(selectedType); genericParameter = genericParams; }); } - private bool IsMouseOverWindow() - { - return position.Contains(GUIUtility.GUIToScreenPoint(Event.current.mousePosition)); - } - private Type GetArrayBase(Type type) + private bool IsMouseOverWindow() => position.Contains(GUIUtility.GUIToScreenPoint(Event.current.mousePosition)); + + private static Type GetArrayBase(Type type) { - if (type.IsArray) + while (type != null && type.IsArray) { type = type.GetElementType(); - while (type.IsArray) - { - type = type.GetElementType(); - } - return type; } return type; } - private IEnumerable GetInvalidParameters(Type type) { - if (type.IsArray) + if (type == null || !type.ContainsGenericParameters) + yield break; + + var current = GetArrayBase(type); + + if (current.IsGenericParameter) { - type = GetArrayBase(type); + yield return current.Name; + yield break; } - foreach (var arg in type.GetGenericArguments()) + + if (current.IsGenericType) { - if (arg.IsGenericParameter) - { - yield return arg.Name; - } - else if (arg.IsGenericType) - { - foreach (var invalidArg in GetInvalidParameters(arg)) - { - yield return invalidArg; - } - } - else if (arg.IsArray) + foreach (var arg in current.GetGenericArguments()) { - var baseType = GetArrayBase(arg); - if (baseType.IsGenericParameter) - { - yield return baseType.Name; - } - else if (baseType.IsGenericType) + foreach (var invalid in GetInvalidParameters(arg)) { - foreach (var invalidArg in GetInvalidParameters(baseType)) - { - yield return invalidArg; - } + yield return invalid; } } } } - private bool IsValidType(Type type, bool checkingNested) + private bool IsValidType(Type type) { - if (type == null) - { - return false; - } - - if (type.IsArray) - { - var elementType = GetArrayBase(type); - - if (elementType.IsGenericType) - { - var genericArguments = elementType.GetGenericArguments(); - foreach (var arg in genericArguments) - { - if (arg.IsGenericParameter) - { - return false; - } - if (!IsValidType(arg, true)) - { - return false; - } - } - } - return IsValidType(elementType, true); - } - else if (checkingNested) - { - if (type.IsArray) - { - var elementType = GetArrayBase(type); - if (elementType.IsGenericType) - { - var genericArguments = elementType.GetGenericArguments(); - foreach (var arg in genericArguments) - { - if (arg.IsGenericParameter) - { - return false; - } - if (!IsValidType(arg, true)) - { - return false; - } - } - } - return IsValidType(elementType, true); - } - else if (type.IsGenericType) - { - var genericArguments = type.GetGenericArguments(); - foreach (var arg in genericArguments) - { - if (arg.IsGenericParameter) - { - return false; - } - if (!IsValidType(arg, true)) - { - return false; - } - } - } - } - return true; + var elementType = GetArrayBase(type); + return elementType != null && !elementType.ContainsGenericParameters; } private Rect DrawTypeField(GUIContent buttonContent, GenericParameter generic, bool isBaseType) { GUILayout.BeginHorizontal(); - Rect buttonRect = new Rect(); + var buttonRect = new Rect(); + if (GUILayout.Button(buttonContent, GUILayout.MaxHeight(19f))) { buttonRect = lastRect; - int selectedIndex = Array.IndexOf(isBaseType && customTypeLookup != null ? customTypeLookup : baseTypeLookup, generic != null ? generic.type.type : typeof(object)); - Type _selected = null; + var lookupSource = isBaseType && customTypeLookup != null ? customTypeLookup : baseTypeLookup; + int selectedIndex = Array.IndexOf(lookupSource, generic?.type.type ?? typeof(object)); + LudiqGUI.FuzzyDropdown(lastRect, isBaseType ? GetBaseTypeOptions() : GetNestedTypeOptions(generic), selectedIndex, (type) => { - _selected = (type as TypeBuilderType).Type; + var selectedType = (type as TypeBuilderType).Type; if (isBaseType) { - var genericParams = new GenericParameter(generic, _selected, _selected.Name); - baseType = _selected; + var genericParams = new GenericParameter(generic, selectedType, selectedType.Name); + baseType = selectedType; genericParameter?.Clear(); - genericParams.AddGenericParameters(_selected); + genericParams.AddGenericParameters(selectedType); genericParameter = genericParams; } else { generic.Clear(); - generic.AddGenericParameters(_selected); - generic.selectedType.type = _selected; - generic.type.type = _selected; + generic.AddGenericParameters(selectedType); + generic.selectedType.type = selectedType; + generic.type.type = selectedType; generic.parent.type.type = generic.parent.ConstructType(); baseType = genericParameter.ConstructType(); } }); } - bool canMakeArray = generic != null - && generic.type.type != null - && !generic.type.type.IsGenericParameter - && CanTypeSupportArray(isBaseType ? genericParameter : generic); + + bool canMakeArray = generic?.type.type != null && !generic.type.type.IsGenericParameter && CanTypeSupportArray(isBaseType ? genericParameter : generic); if (canMakeArray && ((isBaseType && canMakeArrayTypeForBaseType) || (!isBaseType && !generic.type.type.IsGenericParameter))) { @@ -522,22 +415,16 @@ private Rect DrawTypeField(GUIContent buttonContent, GenericParameter generic, b } else if (GUILayout.Button("-")) { - if (isBaseType && genericParameter != null) + if (isBaseType && genericParameter != null && (baseType.IsArray || baseType is FakeGenericParameterType { IsArray: true })) { - if (baseType.IsArray || (baseType is FakeGenericParameterType fakeGenericParameterType && fakeGenericParameterType.IsArray)) - { - baseType = baseType.GetElementType(); - genericParameter.type.type = baseType; - } + baseType = baseType.GetElementType(); + genericParameter.type.type = baseType; } - else + else if (!isBaseType && (generic.type.type.IsArray || generic.type.type is FakeGenericParameterType { IsArray: true })) { - if (generic.type.type.IsArray || (generic.type.type is FakeGenericParameterType fakeGenericParameterType && fakeGenericParameterType.IsArray)) - { - generic.type.type = generic.type.type.GetElementType(); - generic.parent.type.type = generic.parent.ConstructType(); - baseType = genericParameter.ConstructType(); - } + generic.type.type = generic.type.type.GetElementType(); + generic.parent.type.type = generic.parent.ConstructType(); + baseType = genericParameter.ConstructType(); } } GUILayout.EndHorizontal(); @@ -549,19 +436,11 @@ private Rect DrawTypeField(GUIContent buttonContent, GenericParameter generic, b private bool CanTypeSupportArray(GenericParameter param) { - if (param == null || param.type.type == null) return false; - - if (param.type.type == typeof(void)) return false; + if (param?.type.type == null || param.type.type == typeof(void)) return false; if (param.constraints != null && param.constraints.Length > 0) { - foreach (var constraint in param.constraints) - { - if (constraint.IsAssignableFrom(typeof(Array)) || constraint.IsAssignableFrom(param.type.type.MakeArrayType())) - return true; - } - - return false; + return param.constraints.Any(constraint => constraint.IsAssignableFrom(typeof(Array)) || constraint.IsAssignableFrom(param.type.type.MakeArrayType())); } return true; @@ -578,99 +457,77 @@ private void DrawGenericParameter(GenericParameter parameter, Type genericParam) { GUILayout.BeginHorizontal(); GUILayout.Label(genericParam.As().CSharpName(false, false, false), GUILayout.Width(150)); - GUIContent typeButtonContent = new GUIContent(parameter.type.type?.As().CSharpName(false, false, false) ?? "Select Type", parameter.type.type?.GetTypeIcon()); + var typeButtonContent = new GUIContent(parameter.type.type?.As().CSharpName(false, false, false) ?? "Select Type", parameter.type.type?.GetTypeIcon()); DrawTypeField(typeButtonContent, parameter, false); GUILayout.EndHorizontal(); - var index = 0; - foreach (var nested in parameter.nestedParameters) + var type = GetArrayBase(parameter.type.type); + + if (!type.IsGenericType) + return; + + var genericArguments = type.GetGenericTypeDefinition().GetGenericArguments(); + + for (int i = 0; i < parameter.nestedParameters.Count; i++) { - DrawGenericParameter(nested, parameter.type.type.GetGenericTypeDefinition().GetGenericArguments()[index]); - index++; + var nested = parameter.nestedParameters[i]; + + DrawGenericParameter(nested, genericArguments[i]); } }); }); } - public static void ConstructType() + public static void ConstructType() => ConstructTypeInternal(null); + + public static void ConstructType(Metadata metadata) => ConstructTypeInternal(metadata); + + private static void ConstructTypeInternal(Metadata metadata) { - UndoUtility.RecordEditedObject("TypeBuilder Constructed Type"); - Window.onBeforeChanged?.Invoke(); - genericParameter ??= GenericParameter.Create(typeof(object), typeof(object).DisplayName()); - Type constructedType; - if (genericParameter.type.type.IsGenericType && genericParameter.type.type.IsConstructedGenericType) + if (metadata != null) { - var newConstructedType = new GenericParameter(genericParameter, true); - constructedType = newConstructedType.ConstructType(); - Window.result?.Invoke(constructedType); - } - else if (genericParameter.type.type.IsArray) - { - var tempType = genericParameter.type.type.GetElementType(); - while (tempType.IsArray) - { - tempType = tempType.GetElementType(); - } - - if (tempType.IsGenericType && tempType.IsConstructedGenericType) - { - var newConstructedType = new GenericParameter(genericParameter, true); - constructedType = newConstructedType.ConstructType(); - Window.result?.Invoke(constructedType); - } - else - { - constructedType = genericParameter.ConstructType(); - Window.result?.Invoke(constructedType); - } + metadata.RecordUndo(); } else { - constructedType = genericParameter.ConstructType(); - Window.result?.Invoke(constructedType); + UndoUtility.RecordEditedObject("TypeBuilder Constructed Type"); } - Window.onAfterChanged?.Invoke(constructedType); - } - public static void ConstructType(Metadata metadata) - { - metadata.RecordUndo(); Window.onBeforeChanged?.Invoke(); genericParameter ??= GenericParameter.Create(typeof(object), typeof(object).DisplayName()); + Type constructedType; - if (genericParameter.type.type.IsGenericType && genericParameter.type.type.IsConstructedGenericType) - { - var newConstructedType = new GenericParameter(genericParameter, true); - constructedType = newConstructedType.ConstructType(); - metadata.value = constructedType; - } - else if (genericParameter.type.type.IsArray) - { - var tempType = genericParameter.type.type.GetElementType(); - while (tempType.IsArray) - { - tempType = tempType.GetElementType(); - } + var currentType = genericParameter.type.type; - if (tempType.IsGenericType && tempType.IsConstructedGenericType) + if ((currentType.IsGenericType && currentType.IsConstructedGenericType) || currentType.IsArray) + { + var tempType = GetArrayBase(currentType); + if ((tempType != null && tempType.IsGenericType && tempType.IsConstructedGenericType) || currentType.IsGenericType) { var newConstructedType = new GenericParameter(genericParameter, true); constructedType = newConstructedType.ConstructType(); - metadata.value = constructedType; } else { constructedType = genericParameter.ConstructType(); - metadata.value = constructedType; } } else { constructedType = genericParameter.ConstructType(); + } + + if (metadata != null) + { metadata.value = constructedType; } + else + { + Window.result?.Invoke(constructedType); + } + Window.onAfterChanged?.Invoke(constructedType); } } diff --git a/Editor/Windows/UtilityWindow.cs b/Editor/Windows/UtilityWindow.cs index c553c59c..30cb8503 100644 --- a/Editor/Windows/UtilityWindow.cs +++ b/Editor/Windows/UtilityWindow.cs @@ -11,7 +11,7 @@ public class UtilityWindow : EditorWindow private BorderedRectangle container; public static Event e; - public GraphContext graphContext; + public IGraphContext graphContext; public static UtilityWindow Open() { diff --git a/Editor/Windows/View/EditorWindowView.cs b/Editor/Windows/View/EditorWindowView.cs index 5c5aaa08..2e305608 100644 --- a/Editor/Windows/View/EditorWindowView.cs +++ b/Editor/Windows/View/EditorWindowView.cs @@ -45,6 +45,7 @@ public static EditorWindowView CreateWindow(EditorWindowAsset windowType, bool s [SerializeField] public CustomVariables variables = new CustomVariables(); + [NonSerialized] public VisualElement container; public Event e { get; private set; } diff --git a/Runtime/Code/AttributeDeclaration.cs b/Runtime/Code/AttributeDeclaration.cs index 84006faf..db0b62de 100644 --- a/Runtime/Code/AttributeDeclaration.cs +++ b/Runtime/Code/AttributeDeclaration.cs @@ -19,6 +19,7 @@ public class AttributeDeclaration : ISerializationCallbackReceiver [SerializeField] public List parameters = new List(); [Serialize] + [NonSerialized] public Dictionary fields = new Dictionary(); [Serialize] private SerializationData fieldsSerialization; diff --git a/Runtime/Code/ClassAsset.cs b/Runtime/Code/ClassAsset.cs index cea0f43d..ce84f10e 100644 --- a/Runtime/Code/ClassAsset.cs +++ b/Runtime/Code/ClassAsset.cs @@ -25,6 +25,7 @@ public class ClassAsset : MemberTypeAsset onValueChanged; [InspectorWide] + [NonSerialized] public List typeParameters = new List(); [SerializeField] diff --git a/Runtime/Code/ClassFieldDeclaration.cs b/Runtime/Code/ClassFieldDeclaration.cs index 4a82e0a2..3c26604f 100644 --- a/Runtime/Code/ClassFieldDeclaration.cs +++ b/Runtime/Code/ClassFieldDeclaration.cs @@ -18,6 +18,7 @@ public sealed class ClassFieldDeclaration : FieldDeclaration, ISerializationCall #endif [InspectorToggleLeft] [Serialize] + [NonSerialized] public object defaultValue = 0; [Inspectable] diff --git a/Runtime/Code/CodeAsset.cs b/Runtime/Code/CodeAsset.cs index a653ca38..d4ee98de 100644 --- a/Runtime/Code/CodeAsset.cs +++ b/Runtime/Code/CodeAsset.cs @@ -21,6 +21,7 @@ public abstract class CodeAsset : ScriptableObject public List lastCompiledNames = new List(); [FullSerializer.fsProperty(Converter = typeof(FakeGenericParameterTypeConverter))] + [NonSerialized] public Type AssetType; #if UNITY_EDITOR diff --git a/Runtime/Code/FieldDeclaration.cs b/Runtime/Code/FieldDeclaration.cs index f9c1359a..7978903c 100644 --- a/Runtime/Code/FieldDeclaration.cs +++ b/Runtime/Code/FieldDeclaration.cs @@ -12,9 +12,12 @@ namespace Unity.VisualScripting.Community public abstract class FieldDeclaration : ScriptableObject { [Inspectable] + [NonSerialized] public Type type = typeof(int); [Inspectable] + [NonSerialized] + [Serialize] public object value; public string FieldName; diff --git a/Runtime/Code/FunctionNode.cs b/Runtime/Code/FunctionNode.cs index 291843a1..5f0778c1 100644 --- a/Runtime/Code/FunctionNode.cs +++ b/Runtime/Code/FunctionNode.cs @@ -6,7 +6,6 @@ namespace Unity.VisualScripting.Community { - [Serializable] [UnitTitle("Function")] [SpecialUnit] [RenamedFrom("Bolt.Addons.Community.Code.FunctionUnit")] diff --git a/Runtime/Code/Generation/CodeWriter/CodeWriter.cs b/Runtime/Code/Generation/CodeWriter/CodeWriter.cs index 35e9ac8e..9c5b56f3 100644 --- a/Runtime/Code/Generation/CodeWriter/CodeWriter.cs +++ b/Runtime/Code/Generation/CodeWriter/CodeWriter.cs @@ -7,6 +7,7 @@ using Unity.VisualScripting.Community.Libraries.CSharp; using Unity.VisualScripting.Community.Libraries.Humility; using UnityEngine; +using UnityEngine.Assemblies; namespace Unity.VisualScripting.Community { @@ -163,6 +164,21 @@ public CodeWriter WriteIndented(string text = "") return this; } + public CodeWriter WriteIndented(string text, int amount = 1) + { + var oldIndent = IndentLevel; + try + { + Indent(amount); + + return WriteIndented(text); + } + finally + { + IndentLevel = oldIndent; + } + } + public CodeWriter WriteLine(string text = "") { if (IsRecordingSuppressed) @@ -494,9 +510,11 @@ public static void BuildAmbiguityCache() if (cached) return; Dictionary> map = new Dictionary>(); - +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); - +#endif for (int a = 0; a < assemblies.Length; a++) { Type[] types; @@ -554,7 +572,9 @@ public enum WriteOptions NewLineBefore = 1 << 1, NewLineAfter = 1 << 2, NewLineBeforeAndAfter = NewLineBefore | NewLineAfter, - IndentedNewLineAfter = Indented | NewLineAfter + IndentedNewLineBefore = Indented | NewLineBefore, + IndentedNewLineAfter = Indented | NewLineAfter, + IndentedNewLineAfterAndBefore = Indented | NewLineBeforeAndAfter } [Flags] diff --git a/Runtime/Code/MethodDeclaration.cs b/Runtime/Code/MethodDeclaration.cs index a0aa649f..2d4f7501 100644 --- a/Runtime/Code/MethodDeclaration.cs +++ b/Runtime/Code/MethodDeclaration.cs @@ -23,6 +23,7 @@ public abstract class MethodDeclaration : Macro, IGenericContainer Nested = true, NonPublic = false, NonSerializable = true, Object = true, Obsolete = false, OpenConstructedGeneric = false, Primitives = true, Public = true, Reference = true, Sealed = true, Static = false, Structs = true, Value = true)] [FullSerializer.fsProperty(Converter = typeof(FakeGenericParameterTypeConverter))] + [NonSerialized] public Type returnType = typeof(Libraries.CSharp.Void); [SerializeField] @@ -31,6 +32,7 @@ public abstract class MethodDeclaration : Macro, IGenericContainer public int genericParameterCount => genericParameters.Count; + [NonSerialized] public List genericParameters = new List(); /// diff --git a/Runtime/Code/Utility/CodeGeneratorValueUtility.cs b/Runtime/Code/Utility/CodeGeneratorValueUtility.cs index 38ca0bad..b7eaa06f 100644 --- a/Runtime/Code/Utility/CodeGeneratorValueUtility.cs +++ b/Runtime/Code/Utility/CodeGeneratorValueUtility.cs @@ -67,7 +67,11 @@ public SerializableKeyValuePair(string key, string value) private class SerializableValueHandler { public string targetGuid; +#if UNITY_6000_5_OR_NEWER + public EntityId targetEntityID; +#else public int targetInstanceID; +#endif public string scenePath; public List assetValues = new List(); public List sceneObjectValues = new List(); @@ -88,12 +92,23 @@ private static string GetScenePath(Object obj) { if (obj is GameObject go) { +#if UNITY_6000_5_OR_NEWER + return EntityId.ToULong(go.GetEntityId()).ToString(); +#elif UNITY_6000_4_OR_NEWER + return go.GetEntityId().ToString(); +#else return go.GetInstanceID().ToString(); +#endif } else if (obj is Component comp) { - // Add component type to make path unique for different components +#if UNITY_6000_5_OR_NEWER + return EntityId.ToULong(comp.gameObject.GetEntityId()).ToString() + "," + EntityId.ToULong(comp.GetEntityId()).ToString() + "," + comp.GetType().FullName; +#elif UNITY_6000_4_OR_NEWER + return comp.gameObject.GetEntityId().ToString() + "," + comp.GetEntityId().ToString() + "," + comp.GetType().FullName; +#else return comp.gameObject.GetInstanceID().ToString() + "," + comp.GetInstanceID().ToString() + "," + comp.GetType().FullName; +#endif } return null; } @@ -108,7 +123,15 @@ private static void SaveValues() continue; var handler = new SerializableValueHandler(); + +#if UNITY_6000_5_OR_NEWER + handler.targetEntityID = kvp.Key.GetEntityId(); +#elif UNITY_6000_4_OR_NEWER + handler.targetInstanceID = kvp.Key.GetEntityId(); +#else handler.targetInstanceID = kvp.Key.GetInstanceID(); +#endif + handler.scenePath = GetScenePath(kvp.Key); foreach (var valueKvp in kvp.Value) @@ -169,18 +192,41 @@ private static void LoadValues() if (handler.scenePath.Contains(',')) { var split = handler.scenePath.Split(','); - var instanceID = int.Parse(split[0]); - var go = EditorUtility.InstanceIDToObject(instanceID) as GameObject; +#if UNITY_6000_5_OR_NEWER + var goEntityId = EntityId.FromULong(ulong.Parse(split[0])); + var go = EditorUtility.EntityIdToObject(goEntityId) as GameObject; +#elif UNITY_6000_3_OR_NEWER + var ID = int.Parse(split[0]); + var go = EditorUtility.EntityIdToObject(ID) as GameObject; +#else + var ID = int.Parse(split[0]); + var go = EditorUtility.InstanceIDToObject(ID) as GameObject; +#endif if (go != null) { target = go.GetComponents() - .FirstOrDefault(c => c != null && c.GetInstanceID() == int.Parse(split[1])); + .FirstOrDefault(c => c != null && +#if UNITY_6000_5_OR_NEWER + c.GetEntityId() == EntityId.FromULong(ulong.Parse(split[1]))); +#elif UNITY_6000_4_OR_NEWER + c.GetEntityId() == int.Parse(split[1])); +#else + c.GetInstanceID() == int.Parse(split[1])); +#endif } } else { - var instanceID = int.Parse(handler.scenePath); - target = EditorUtility.InstanceIDToObject(instanceID) as GameObject; +#if UNITY_6000_5_OR_NEWER + var goEntityId = EntityId.FromULong(ulong.Parse(handler.scenePath)); + target = EditorUtility.EntityIdToObject(goEntityId) as GameObject; +#elif UNITY_6000_3_OR_NEWER + var ID = int.Parse(handler.scenePath); + target = EditorUtility.EntityIdToObject(ID) as GameObject; +#else + var ID = int.Parse(handler.scenePath); + target = EditorUtility.InstanceIDToObject(ID) as GameObject; +#endif } } @@ -206,18 +252,41 @@ private static void LoadValues() if (pair.value.Contains(',')) { var split = pair.value.Split(','); - var instanceID = int.Parse(split[0]); - var go = EditorUtility.InstanceIDToObject(instanceID) as GameObject; +#if UNITY_6000_5_OR_NEWER + var goEntityId = EntityId.FromULong(ulong.Parse(split[0])); + var go = EditorUtility.EntityIdToObject(goEntityId) as GameObject; +#elif UNITY_6000_3_OR_NEWER + var ID = int.Parse(split[0]); + var go = EditorUtility.EntityIdToObject(ID) as GameObject; +#else + var ID = int.Parse(split[0]); + var go = EditorUtility.InstanceIDToObject(ID) as GameObject; +#endif if (go != null) { sceneValue = go.GetComponents() - .FirstOrDefault(c => c.GetInstanceID() == int.Parse(split[1])); + .FirstOrDefault(c => c != null && +#if UNITY_6000_5_OR_NEWER + c.GetEntityId() == EntityId.FromULong(ulong.Parse(split[1]))); +#elif UNITY_6000_4_OR_NEWER + c.GetEntityId() == int.Parse(split[1])); +#else + c.GetInstanceID() == int.Parse(split[1])); +#endif } } else { - var instanceID = int.Parse(pair.value); - sceneValue = EditorUtility.InstanceIDToObject(instanceID); +#if UNITY_6000_5_OR_NEWER + var goEntityId = EntityId.FromULong(ulong.Parse(pair.value)); + sceneValue = EditorUtility.EntityIdToObject(goEntityId) as GameObject; +#elif UNITY_6000_3_OR_NEWER + var ID = int.Parse(pair.value); + sceneValue = EditorUtility.EntityIdToObject(ID) as GameObject; +#else + var ID = int.Parse(pair.value); + sceneValue = EditorUtility.InstanceIDToObject(ID) as GameObject; +#endif } if (sceneValue != null && !valueDict.ContainsValue(sceneValue)) @@ -267,9 +336,7 @@ private static Object EnsureCurrentAsset(Object shouldBe = null) return null; #endif } - /// - /// Used to communicate with the CodeGenerator to get the current scriptmachine from the target object. - /// + public static System.Func requestMachine; public static Object currentAsset; public static void SetIsUsed(string variableName) @@ -329,6 +396,7 @@ public static bool TryGetVariable(Object value, out string variableName) variableName = ""; return false; } + public static Dictionary GetAllValues(Object target, bool clearObsolete = true) { EnsureCurrentAsset(target); @@ -339,6 +407,7 @@ public static Dictionary GetAllValues(Object target, bool clearO return ObjectValueHandlers[target]; else return new Dictionary(); } + public static void RemoveObsoleteValues(Object target) { EnsureLoaded(); diff --git a/Runtime/Community Options/CommunityOptionFetcher.cs b/Runtime/Community Options/CommunityOptionFetcher.cs index d84a4281..6a8ba635 100644 --- a/Runtime/Community Options/CommunityOptionFetcher.cs +++ b/Runtime/Community Options/CommunityOptionFetcher.cs @@ -5,6 +5,7 @@ using System.Text; using System.Threading.Tasks; using UnityEngine; +using UnityEngine.Assemblies; namespace Unity.VisualScripting.Community { @@ -17,7 +18,11 @@ static CommunityOptionFetcher() lock (lockObject) { var type = typeof(CommunityOptions); +#if UNITY_6000_4_OR_NEWER + var types = CurrentAssemblies.GetLoadedAssemblies() +#else var types = AppDomain.CurrentDomain.GetAssemblies() +#endif .SelectMany(s => s.GetTypes()) .Where(p => { diff --git a/Runtime/Graph Snippets/GraphSnippet.cs b/Runtime/Graph Snippets/GraphSnippet.cs index a1e64f0c..d7360074 100644 --- a/Runtime/Graph Snippets/GraphSnippet.cs +++ b/Runtime/Graph Snippets/GraphSnippet.cs @@ -38,6 +38,7 @@ public class SnippetArgument [Inspectable] [TypeFilter(TypesMatching.Any, typeof(string), typeof(int), typeof(float), typeof(double), typeof(decimal), typeof(bool), typeof(char), typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(uint), typeof(long), typeof(ulong), typeof(LayerMask))] [TypeSet(TypeSet.SettingsAssembliesTypes)] + [NonSerialized] public Type argumentType = typeof(string); } } diff --git a/Runtime/Nodes/Events/Nodes/EveryXSeconds.cs b/Runtime/Nodes/Events/Nodes/EveryXSeconds.cs index 7be17cab..a7cd6465 100644 --- a/Runtime/Nodes/Events/Nodes/EveryXSeconds.cs +++ b/Runtime/Nodes/Events/Nodes/EveryXSeconds.cs @@ -45,13 +45,6 @@ protected override void Definition() unscaledTime = ValueInput(nameof(unscaledTime), false); } - public override void StartListening(GraphStack stack) - { - base.StartListening(stack); - - var data = stack.GetElementData(this); - } - protected override bool ShouldTrigger(Flow flow, EmptyEventArgs args) { var data = flow.stack.GetElementData(this); diff --git a/Runtime/Nodes/Events/Nodes/OnUnityEvent.cs b/Runtime/Nodes/Events/Nodes/OnUnityEvent.cs index e15e5de6..9335af58 100644 --- a/Runtime/Nodes/Events/Nodes/OnUnityEvent.cs +++ b/Runtime/Nodes/Events/Nodes/OnUnityEvent.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Reflection; using UnityEngine; +using UnityEngine.Assemblies; using UnityEngine.Events; namespace Unity.VisualScripting.Community @@ -228,7 +229,11 @@ private Type GetAotSupportMethodsType() AotSupportMethodsType = Type.GetType("Unity.VisualScripting.Community.Generated.AotSupportMethods, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"); if (AotSupportMethodsType == null) { +#if UNITY_6000_4_OR_NEWER + foreach (var asm in CurrentAssemblies.GetLoadedAssemblies()) +#else foreach (var asm in AppDomain.CurrentDomain.GetAssemblies()) +#endif { AotSupportMethodsType = asm.GetType(AotSupportTypeFullName); if (AotSupportMethodsType != null) diff --git a/Runtime/Nodes/Fundamentals/Control/EdgeTrigger.cs b/Runtime/Nodes/Fundamentals/Control/EdgeTrigger.cs index b425b301..8d4e2427 100644 --- a/Runtime/Nodes/Fundamentals/Control/EdgeTrigger.cs +++ b/Runtime/Nodes/Fundamentals/Control/EdgeTrigger.cs @@ -7,10 +7,15 @@ [RenamedFrom("Bolt.Addons.Community.Logic.Units.EdgeTrigger")] [RenamedFrom("Bolt.Addons.Community.Fundamentals.EdgeTrigger")] [TypeIcon(typeof(ISelectUnit))] - public sealed class EdgeTrigger : Unit + public sealed class EdgeTrigger : Unit, IGraphElementWithData { public EdgeTrigger() : base() { } + private class Data : IGraphElementData + { + public bool? lastEdge; + } + /// /// The entry point for the branch. /// @@ -37,13 +42,18 @@ public EdgeTrigger() : base() { } [PortLabelHidden] public ControlOutput exit { get; private set; } - private bool? _lastEdge; - protected override void Definition() { enter = ControlInput(nameof(enter), Enter); inValue = ValueInput(nameof(inValue), false); - outValue = ValueOutput(nameof(outValue), (recursion) => { if (_lastEdge.HasValue) return _lastEdge.Value; return false; }); + outValue = ValueOutput(nameof(outValue), (flow) => + { + var data = flow.stack.GetElementData(this); + + if (data.lastEdge.HasValue) + return data.lastEdge.Value; + return false; + }); exit = ControlOutput(nameof(exit)); Succession(enter, exit); @@ -54,14 +64,20 @@ protected override void Definition() public ControlOutput Enter(Flow flow) { + var data = flow.stack.GetElementData(this); bool currentValue = flow.GetValue(inValue); - if (!_lastEdge.HasValue || _lastEdge != currentValue) + if (!data.lastEdge.HasValue || data.lastEdge != currentValue) { - _lastEdge = currentValue; + data.lastEdge = currentValue; return exit; } return null; } + + public IGraphElementData CreateData() + { + return new Data(); + } } } \ No newline at end of file diff --git a/Runtime/Nodes/Fundamentals/Control/Gate.cs b/Runtime/Nodes/Fundamentals/Control/Gate.cs index c26ae901..457c3634 100644 --- a/Runtime/Nodes/Fundamentals/Control/Gate.cs +++ b/Runtime/Nodes/Fundamentals/Control/Gate.cs @@ -8,10 +8,16 @@ [RenamedFrom("Bolt.Addons.Community.Fundamentals.Gate")] [TypeIcon(typeof(ISelectUnit))] [UnitOrder(0)] - public sealed class Gate : Unit + public sealed class Gate : Unit, IGraphElementWithData { public Gate() : base() { } + private class Data : IGraphElementData + { + public bool isInitial = true; + public bool isOpen = false; + } + /// /// The entry point for the branch. /// @@ -50,9 +56,6 @@ public Gate() : base() { } [PortLabel("Exit")] public ControlOutput exit { get; private set; } - private bool _isInitial = true; - private bool _isOpen = false; - protected override void Definition() { enter = ControlInput(nameof(enter), Enter); @@ -69,40 +72,53 @@ protected override void Definition() public ControlOutput Enter(Flow flow) { - PrepInitialState(flow); + var data = flow.stack.GetElementData(this); + + PrepInitialState(flow, data); - if (_isOpen) + if (data.isOpen) return exit; return null; } - private ControlOutput Open(Flow obj) + private ControlOutput Open(Flow flow) { - _isInitial = false; - _isOpen = true; + var data = flow.stack.GetElementData(this); + + data.isInitial = false; + data.isOpen = true; return null; } - private ControlOutput Close(Flow obj) + private ControlOutput Close(Flow flow) { - _isInitial = false; - _isOpen = false; + var data = flow.stack.GetElementData(this); + + data.isInitial = false; + data.isOpen = false; return null; } - private ControlOutput Toggle(Flow obj) + private ControlOutput Toggle(Flow flow) { - _isInitial = false; - _isOpen = !_isOpen; + var data = flow.stack.GetElementData(this); + + data.isInitial = false; + data.isOpen = !data.isOpen; return null; } - private void PrepInitialState(Flow flow) + private void PrepInitialState(Flow flow, Data data) + { + if (data.isInitial) + data.isOpen = flow.GetValue(initialState); + data.isInitial = false; + } + + public IGraphElementData CreateData() { - if (_isInitial) - _isOpen = flow.GetValue(initialState); - _isInitial = false; + return new Data(); } } } \ No newline at end of file diff --git a/Runtime/Nodes/Fundamentals/Control/LimitedTrigger.cs b/Runtime/Nodes/Fundamentals/Control/LimitedTrigger.cs index 73d07e9c..7c95525c 100644 --- a/Runtime/Nodes/Fundamentals/Control/LimitedTrigger.cs +++ b/Runtime/Nodes/Fundamentals/Control/LimitedTrigger.cs @@ -4,8 +4,13 @@ namespace Unity.VisualScripting.Community [UnitTitle("LimitedTrigger")] [UnitCategory("Community\\Control")] [TypeIcon(typeof(Once))] - public class LimitedTrigger : Unit + public class LimitedTrigger : Unit, IGraphElementWithData { + private class Data : IGraphElementData + { + public int timesTriggered; + } + [DoNotSerialize] [PortLabelHidden] public ControlInput Input; @@ -23,8 +28,6 @@ public class LimitedTrigger : Unit [DoNotSerialize] public ValueInput Times; - private int timesTriggered = 0; - protected override void Definition() { Input = ControlInput(nameof(Input), IncreaseTimes); @@ -41,11 +44,12 @@ protected override void Definition() private ControlOutput IncreaseTimes(Flow flow) { + var data = flow.stack.GetElementData(this); int timesToTrigger = (int)flow.GetValue(Times); - if (timesTriggered < timesToTrigger) + if (data.timesTriggered < timesToTrigger) { - timesTriggered++; + data.timesTriggered++; return Exit; } else @@ -56,8 +60,15 @@ private ControlOutput IncreaseTimes(Flow flow) private ControlOutput ResetTimes(Flow flow) { - timesTriggered = 0; + var data = flow.stack.GetElementData(this); + + data.timesTriggered = 0; return null; } + + public IGraphElementData CreateData() + { + return new Data(); + } } } diff --git a/Runtime/Nodes/Fundamentals/Control/Using.cs b/Runtime/Nodes/Fundamentals/Control/Using.cs index 4bf7c94e..97f0f76c 100644 --- a/Runtime/Nodes/Fundamentals/Control/Using.cs +++ b/Runtime/Nodes/Fundamentals/Control/Using.cs @@ -20,7 +20,7 @@ public class Using : Unit public ValueInput value; protected override void Definition() { - enter = ControlInput(nameof(enter), Trigger); + enter = ControlInputCoroutine(nameof(enter), Trigger, TriggerCoroutine); exit = ControlOutput(nameof(exit)); body = ControlOutput(nameof(body)); value = ValueInput(nameof(value), default); @@ -29,12 +29,9 @@ protected override void Definition() Succession(enter, exit); Succession(enter, body); } + public ControlOutput Trigger(Flow flow) { - if (flow.isCoroutine) - { - throw new NotSupportedException("The 'using' statement cannot be used with coroutines."); - } var disposable = flow.GetValue(value); using (disposable) { @@ -42,5 +39,15 @@ public ControlOutput Trigger(Flow flow) } return exit; } + + public IEnumerator TriggerCoroutine(Flow flow) + { + var disposable = flow.GetValue(value); + using (disposable) + { + yield return body; + } + yield return exit; + } } } \ No newline at end of file diff --git a/Runtime/Nodes/Fundamentals/Documenting/CommentNode.cs b/Runtime/Nodes/Fundamentals/Documenting/CommentNode.cs index db4159de..b2e1eeac 100644 --- a/Runtime/Nodes/Fundamentals/Documenting/CommentNode.cs +++ b/Runtime/Nodes/Fundamentals/Documenting/CommentNode.cs @@ -11,7 +11,6 @@ namespace Unity.VisualScripting.Community [UnitTitle("Comment")] [UnitShortTitle("")] [UnitCategory("Community\\Documentation")] - [Serializable] public class CommentNode : Unit { // Global diff --git a/Runtime/Nodes/Fundamentals/Logic/Boolean/Latch.cs b/Runtime/Nodes/Fundamentals/Logic/Boolean/Latch.cs index d5a0e962..2f791214 100644 --- a/Runtime/Nodes/Fundamentals/Logic/Boolean/Latch.cs +++ b/Runtime/Nodes/Fundamentals/Logic/Boolean/Latch.cs @@ -6,10 +6,15 @@ [UnitCategory("Community\\Logic")] [RenamedFrom("Bolt.Addons.Community.Logic.Units.Latch")] [RenamedFrom("Bolt.Addons.Community.Fundamentals.Latch")] - public sealed class Latch : Unit + public sealed class Latch : Unit, IGraphElementWithData { public Latch() : base() { } + private class Data : IGraphElementData + { + public bool isSet; + } + /// /// The entry point for the Latch. /// @@ -55,8 +60,6 @@ public Latch() : base() { } [DoNotSerialize] public ValueOutput value { get; private set; } - private bool _isSet = false; - protected override void Definition() { enter = ControlInput(nameof(enter), Enter); @@ -64,7 +67,7 @@ protected override void Definition() reset = ValueInput(nameof(reset), false); resetDominant = ValueInput(nameof(resetDominant), false); exit = ControlOutput(nameof(exit)); - value = ValueOutput(nameof(value), (x) => _isSet); + value = ValueOutput(nameof(value), (flow) => flow.stack.GetElementData(this).isSet); Succession(enter, exit); @@ -81,27 +84,33 @@ protected override void Definition() public ControlOutput Enter(Flow flow) { + var data = flow.stack.GetElementData(this); if (flow.GetValue(set)) { if (flow.GetValue(reset)) { if (flow.GetValue(resetDominant)) - _isSet = false; + data.isSet = false; else - _isSet = true; + data.isSet = true; } else { - _isSet = true; + data.isSet = true; } } else { if (flow.GetValue(reset)) - _isSet = false; + data.isSet = false; } return exit; } + + public IGraphElementData CreateData() + { + return new Data(); + } } } \ No newline at end of file diff --git a/Runtime/Nodes/Fundamentals/Logic/Boolean/ToggleBool.cs b/Runtime/Nodes/Fundamentals/Logic/Boolean/ToggleBool.cs index e77f891d..db88e130 100644 --- a/Runtime/Nodes/Fundamentals/Logic/Boolean/ToggleBool.cs +++ b/Runtime/Nodes/Fundamentals/Logic/Boolean/ToggleBool.cs @@ -6,8 +6,15 @@ namespace Unity.VisualScripting.Community [UnitCategory("Community\\Utility")] [UnitTitle("Toggle Boolean")] [TypeIcon(typeof(ToggleFlow))] - public class ToggleBool : Unit + public class ToggleBool : Unit, IGraphElementWithData { + private class Data : IGraphElementData + { + public bool Cached = false; + + public bool value; + } + [DoNotSerialize] public ValueInput Value; @@ -15,10 +22,6 @@ public class ToggleBool : Unit [PortLabelHidden] public ValueOutput Result; - private bool Cached = false; - - private bool value; - protected override void Definition() { Value = ValueInput(nameof(Value)); @@ -27,26 +30,30 @@ protected override void Definition() private bool GetResult(Flow flow) { - if (!Cached) + var data = flow.stack.GetElementData(this); + if (!data.Cached) { - value = (bool)flow.GetValue(Value); + data.value = (bool)flow.GetValue(Value); - value = !value; + data.value = !data.value; - Cached = true; + data.Cached = true; - return value; + return data.value; } else { - flow.SetValue(Value, value); + flow.SetValue(Value, data.value); - value = !value; + data.value = !data.value; - return value; + return data.value; } + } - + public IGraphElementData CreateData() + { + return new Data(); } } diff --git a/Runtime/Nodes/Fundamentals/Logic/Branching/If.cs b/Runtime/Nodes/Fundamentals/Logic/Branching/If.cs index 34a10981..53f3296d 100644 --- a/Runtime/Nodes/Fundamentals/Logic/Branching/If.cs +++ b/Runtime/Nodes/Fundamentals/Logic/Branching/If.cs @@ -25,7 +25,7 @@ public class BetterIf : Unit [DoNotSerialize] public ControlOutput False; [DoNotSerialize] - [PortLabel("Next")] + [PortLabel("Then")] public ControlOutput Finished; protected override void Definition() diff --git a/Runtime/Nodes/Fundamentals/String/Stringbuilder/StringbuilderUnit.cs b/Runtime/Nodes/Fundamentals/String/Stringbuilder/StringbuilderUnit.cs index e0ad0d36..ca5bf515 100644 --- a/Runtime/Nodes/Fundamentals/String/Stringbuilder/StringbuilderUnit.cs +++ b/Runtime/Nodes/Fundamentals/String/Stringbuilder/StringbuilderUnit.cs @@ -35,7 +35,7 @@ public enum AppendMode [Inspectable, InspectorLabel("Append Modes", "List to store the modes for each input (Max: 10 items)")] [InspectorWide] [InspectorRange(MinInputs, MaxInputs)] - public List appendModes = new List(); + public List appendModes = new List() { new StringAppendMode() { appendMode = AppendMode.Default} }; [DoNotSerialize] public List inputPorts { get; private set; } = new List(); diff --git a/Runtime/Nodes/Fundamentals/Utility/Counter.cs b/Runtime/Nodes/Fundamentals/Utility/Counter.cs index b00872c2..f3b3c8f6 100644 --- a/Runtime/Nodes/Fundamentals/Utility/Counter.cs +++ b/Runtime/Nodes/Fundamentals/Utility/Counter.cs @@ -7,8 +7,13 @@ namespace Unity.VisualScripting.Community [UnitTitle("Counter")] [UnitCategory("Community\\Utility")] [TypeIcon(typeof(Add))] - public class CounterNode : Unit + public class CounterNode : Unit, IGraphElementWithData { + private class Data : IGraphElementData + { + public int counter; + } + [DoNotSerialize] [PortLabelHidden] public ControlInput enter; @@ -39,16 +44,23 @@ protected override void Definition() public ControlOutput OnEnter(Flow flow) { - counter++; + var data = flow.stack.GetElementData(this); + data.counter++; flow.SetValue(timesTriggered, counter); return exit; } public ControlOutput OnReset(Flow flow) { - counter = 0; + var data = flow.stack.GetElementData(this); + data.counter = 0; flow.SetValue(timesTriggered, counter); return null; } + + public IGraphElementData CreateData() + { + return new Data(); + } } } diff --git a/Runtime/Nodes/Fundamentals/Utility/ValueReroute.cs b/Runtime/Nodes/Fundamentals/Utility/ValueReroute.cs index bf46e7aa..0aca366c 100644 --- a/Runtime/Nodes/Fundamentals/Utility/ValueReroute.cs +++ b/Runtime/Nodes/Fundamentals/Utility/ValueReroute.cs @@ -32,8 +32,12 @@ public sealed class ValueReroute : Unit protected override void Definition() { input = ValueInput(portType, "in"); - output = ValueOutput(portType, "out", (flow) => { return flow.GetValue(input); }); - Requirement(input, output); + output = ValueOutput(portType, "out", (flow) => { return flow.GetValue(input); }).PredictableIf(f => + { + var connection = input.connection; + + return connection != null && Flow.CanPredict(connection.source, f.stack.AsReference()); + }); } } } \ No newline at end of file diff --git a/Runtime/Shared/Libraries/CSharp/Constructs/Modifiers/PropertyModifier.cs b/Runtime/Shared/Libraries/CSharp/Constructs/Modifiers/PropertyModifier.cs index 3d2ab652..1a63c924 100644 --- a/Runtime/Shared/Libraries/CSharp/Constructs/Modifiers/PropertyModifier.cs +++ b/Runtime/Shared/Libraries/CSharp/Constructs/Modifiers/PropertyModifier.cs @@ -14,5 +14,6 @@ public enum PropertyModifier Unsafe = 1 << 4, Volatile = 1 << 5, New = 1 << 6, + Virtual = 1 << 7, } } diff --git a/Runtime/Shared/Libraries/CSharp/Generators/Constructs/AttributeGenerator.cs b/Runtime/Shared/Libraries/CSharp/Generators/Constructs/AttributeGenerator.cs index b0f4db00..31a37e55 100644 --- a/Runtime/Shared/Libraries/CSharp/Generators/Constructs/AttributeGenerator.cs +++ b/Runtime/Shared/Libraries/CSharp/Generators/Constructs/AttributeGenerator.cs @@ -39,7 +39,7 @@ public override void Generate(CodeWriter writer, ControlGenerationData data) // Add parameters with labels for (int i = 0; i < parameterValuesWithLabel.Count; i++) { - parameterList.Add(parameterValuesWithLabel[i].Item1.VariableHighlight() + " = " + writer.Object(parameterValuesWithLabel[i].Item2)); + parameterList.Add(parameterValuesWithLabel[i].Item1.VariableHighlight() + " = " + writer.ObjectString(parameterValuesWithLabel[i].Item2)); } // Add type parameters diff --git a/Runtime/Shared/Libraries/CSharp/Generators/Constructs/PropertyGenerator.cs b/Runtime/Shared/Libraries/CSharp/Generators/Constructs/PropertyGenerator.cs index 856938fc..bd9ffbe8 100644 --- a/Runtime/Shared/Libraries/CSharp/Generators/Constructs/PropertyGenerator.cs +++ b/Runtime/Shared/Libraries/CSharp/Generators/Constructs/PropertyGenerator.cs @@ -362,7 +362,7 @@ public void SetSetterOwner(Unit setterOwner) public bool IsAutoImplemented() { - return (getterBodyAction == null && setterBodyAction == null) || (modifier == PropertyModifier.Abstract); + return (getterBodyAction == null && setterBodyAction == null) || ((modifier & PropertyModifier.Abstract) != 0); } public PropertyGenerator SetWarning(string warning) diff --git a/Runtime/Shared/Libraries/CSharp/Generators/Operators/BinaryOperatorGenerator.cs b/Runtime/Shared/Libraries/CSharp/Generators/Operators/BinaryOperatorGenerator.cs index 299b5774..5a86ca92 100644 --- a/Runtime/Shared/Libraries/CSharp/Generators/Operators/BinaryOperatorGenerator.cs +++ b/Runtime/Shared/Libraries/CSharp/Generators/Operators/BinaryOperatorGenerator.cs @@ -8,7 +8,6 @@ namespace Unity.VisualScripting.Community.Libraries.CSharp /// /// A generator that retains data for creating a Binary Operator as a string. /// - [Serializable] [RenamedFrom("Bolt.Addons.Community.Libraries.CSharp.BinaryOperatorGenerator")] public sealed class BinaryOperatorGenerator : ConstructGenerator { diff --git a/Runtime/Shared/Libraries/CSharp/Utilities/CodeConverter.cs b/Runtime/Shared/Libraries/CSharp/Utilities/CodeConverter.cs index 29009a4d..8abf157b 100644 --- a/Runtime/Shared/Libraries/CSharp/Utilities/CodeConverter.cs +++ b/Runtime/Shared/Libraries/CSharp/Utilities/CodeConverter.cs @@ -28,43 +28,44 @@ public static string AsString(this RootAccessModifier scope) { FieldModifier.Readonly, new FieldModifier[] { FieldModifier.Constant, FieldModifier.Volatile } }, { FieldModifier.Volatile, new FieldModifier[] { FieldModifier.Constant, FieldModifier.Readonly } }, { FieldModifier.Unsafe, new FieldModifier[] { FieldModifier.Constant } }, - { FieldModifier.New, new FieldModifier[0] }, - { FieldModifier.None, new FieldModifier[0] } + { FieldModifier.New, Array.Empty() }, + { FieldModifier.None, Array.Empty() } }; public static readonly Dictionary propertyModifierConflicts = new Dictionary() { - { PropertyModifier.Abstract, new[] { PropertyModifier.Static, PropertyModifier.Sealed, PropertyModifier.Override, PropertyModifier.Unsafe, PropertyModifier.Volatile } }, - { PropertyModifier.Override, new[] { PropertyModifier.Static, PropertyModifier.Sealed, PropertyModifier.Abstract, PropertyModifier.Unsafe, PropertyModifier.Volatile } }, - { PropertyModifier.Sealed, new[] { PropertyModifier.Static, PropertyModifier.Abstract, PropertyModifier.Unsafe, PropertyModifier.Volatile } }, - { PropertyModifier.Static, new[] { PropertyModifier.Abstract, PropertyModifier.Override, PropertyModifier.Sealed, PropertyModifier.Volatile } }, - { PropertyModifier.Unsafe, new[] { PropertyModifier.Abstract, PropertyModifier.Override, PropertyModifier.Sealed, PropertyModifier.Volatile } }, - { PropertyModifier.Volatile, new[] { PropertyModifier.Abstract, PropertyModifier.Override, PropertyModifier.Sealed, PropertyModifier.Static, PropertyModifier.Unsafe } }, - { PropertyModifier.New, Array.Empty() }, - { PropertyModifier.None, Array.Empty() }, + { PropertyModifier.Abstract, new[] { PropertyModifier.Static, PropertyModifier.Sealed, PropertyModifier.Override, PropertyModifier.Virtual, PropertyModifier.Volatile } }, + { PropertyModifier.Override, new[] { PropertyModifier.Static, PropertyModifier.Abstract, PropertyModifier.Virtual, PropertyModifier.New, PropertyModifier.Volatile } }, + { PropertyModifier.Sealed, new[] { PropertyModifier.Static, PropertyModifier.Abstract, PropertyModifier.Virtual, PropertyModifier.Volatile } }, + { PropertyModifier.Static, new[] { PropertyModifier.Abstract, PropertyModifier.Virtual, PropertyModifier.Override, PropertyModifier.Sealed, PropertyModifier.Volatile } }, + { PropertyModifier.Virtual, new[] { PropertyModifier.Static, PropertyModifier.Abstract, PropertyModifier.Override, PropertyModifier.Sealed, PropertyModifier.Volatile } }, + { PropertyModifier.Unsafe, new[] { PropertyModifier.Volatile } }, + { PropertyModifier.Volatile, new[] { PropertyModifier.Abstract, PropertyModifier.Override, PropertyModifier.Sealed, PropertyModifier.Static, PropertyModifier.Unsafe, PropertyModifier.New, PropertyModifier.Virtual } }, + { PropertyModifier.New, new[] { PropertyModifier.Override, PropertyModifier.Volatile } }, + { PropertyModifier.None, Array.Empty() }, }; public static readonly Dictionary parameterModifierConflicts = new Dictionary { - { ParameterModifier.In, new ParameterModifier[] { ParameterModifier.Out, ParameterModifier.Ref, ParameterModifier.Params, ParameterModifier.This } }, - { ParameterModifier.Out, new ParameterModifier[] { ParameterModifier.In, ParameterModifier.Ref, ParameterModifier.Params, ParameterModifier.This } }, - { ParameterModifier.Ref, new ParameterModifier[] { ParameterModifier.In, ParameterModifier.Out, ParameterModifier.Params } }, + { ParameterModifier.In, new ParameterModifier[] { ParameterModifier.Out, ParameterModifier.Ref, ParameterModifier.Params } }, + { ParameterModifier.Out, new ParameterModifier[] { ParameterModifier.In, ParameterModifier.Ref, ParameterModifier.Params, ParameterModifier.This } }, + { ParameterModifier.Ref, new ParameterModifier[] { ParameterModifier.In, ParameterModifier.Out, ParameterModifier.Params } }, { ParameterModifier.Params, new ParameterModifier[] { ParameterModifier.In, ParameterModifier.Out, ParameterModifier.Ref, ParameterModifier.This } }, - { ParameterModifier.This, new ParameterModifier[] { ParameterModifier.In, ParameterModifier.Out, ParameterModifier.Params } }, - { ParameterModifier.None, Array.Empty() } + { ParameterModifier.This, new ParameterModifier[] { ParameterModifier.Out, ParameterModifier.Params } }, + { ParameterModifier.None, Array.Empty() } }; public static readonly Dictionary methodModifierConflicts = new Dictionary { { MethodModifier.Abstract, new MethodModifier[] { MethodModifier.Static, MethodModifier.Sealed, MethodModifier.Override, MethodModifier.Extern, MethodModifier.Virtual, MethodModifier.Async } }, - { MethodModifier.Virtual, new MethodModifier[] { MethodModifier.Static, MethodModifier.Sealed, MethodModifier.Override, MethodModifier.Extern, MethodModifier.Abstract, MethodModifier.Async } }, - { MethodModifier.Override, new MethodModifier[] { MethodModifier.Static, MethodModifier.Sealed, MethodModifier.Virtual, MethodModifier.Extern, MethodModifier.Abstract } }, - { MethodModifier.Sealed, new MethodModifier[] { MethodModifier.Static, MethodModifier.Virtual, MethodModifier.Override, MethodModifier.Extern, MethodModifier.Abstract } }, + { MethodModifier.Virtual, new MethodModifier[] { MethodModifier.Static, MethodModifier.Sealed, MethodModifier.Override, MethodModifier.Extern, MethodModifier.Abstract } }, + { MethodModifier.Override, new MethodModifier[] { MethodModifier.Static, MethodModifier.Virtual, MethodModifier.Extern, MethodModifier.Abstract } }, + { MethodModifier.Sealed, new MethodModifier[] { MethodModifier.Static, MethodModifier.Virtual, MethodModifier.Extern, MethodModifier.Abstract } }, { MethodModifier.Static, new MethodModifier[] { MethodModifier.Abstract, MethodModifier.Virtual, MethodModifier.Override, MethodModifier.Sealed } }, { MethodModifier.Extern, new MethodModifier[] { MethodModifier.Abstract, MethodModifier.Virtual, MethodModifier.Override, MethodModifier.Sealed } }, { MethodModifier.Async, new MethodModifier[] { MethodModifier.Abstract } }, - { MethodModifier.Unsafe, new MethodModifier[0] }, - { MethodModifier.None, new MethodModifier[0] }, + { MethodModifier.Unsafe, Array.Empty() }, + { MethodModifier.None, Array.Empty() }, }; public static string AsString(this FieldModifier modifier) diff --git a/Runtime/Shared/Libraries/Humility/Collections/DefinedDictionary.cs b/Runtime/Shared/Libraries/Humility/Collections/DefinedDictionary.cs index 7ce63d4b..465ee33f 100644 --- a/Runtime/Shared/Libraries/Humility/Collections/DefinedDictionary.cs +++ b/Runtime/Shared/Libraries/Humility/Collections/DefinedDictionary.cs @@ -8,7 +8,9 @@ namespace Unity.VisualScripting.Community.Libraries.Humility [Serializable] public class DefinedDictionary : ISerializationCallbackReceiver { + [NonSerialized] public Dictionary previous = new Dictionary(); + [NonSerialized] public Dictionary current = new Dictionary(); [SerializeField] private List previousSerializedKeys = new List(); diff --git a/Runtime/Shared/Libraries/Humility/Color/HUMColor.cs b/Runtime/Shared/Libraries/Humility/Color/HUMColor.cs index bf79f61f..21ed385a 100644 --- a/Runtime/Shared/Libraries/Humility/Color/HUMColor.cs +++ b/Runtime/Shared/Libraries/Humility/Color/HUMColor.cs @@ -70,8 +70,8 @@ public static Color Mix(this Color value, Color other) return new Color((value.r + other.r) / 2, (value.g + other.g) / 2, (value.b + other.b) / 2); } /// - /// Lightens up the color by adding all values by the percent. - /// + /// Lightens up the color by adding all values by the percent. + /// public static Color Blend(this Color value, Color other, float percent) { return new Color((value.r + (other.r * percent)) / 2, (value.g + (other.g * percent)) / 2, (value.b + (other.b * percent)) / 2); diff --git a/Runtime/Shared/Libraries/Humility/Type/HUMType_Children.cs b/Runtime/Shared/Libraries/Humility/Type/HUMType_Children.cs index 8afd4d59..d1084ea3 100644 --- a/Runtime/Shared/Libraries/Humility/Type/HUMType_Children.cs +++ b/Runtime/Shared/Libraries/Humility/Type/HUMType_Children.cs @@ -7,6 +7,7 @@ using UnityEngine; using System.Linq; using Unity.VisualScripting.Community.Libraries.Humility; +using UnityEngine.Assemblies; namespace Unity.VisualScripting.Community.Libraries.Humility { @@ -537,8 +538,11 @@ public static bool UnityObject(this HUMType.Data.Is isData) public static Type[] Attribute(this HUMType.Data.With with, Assembly _assembly = null, Func predicate = null) where TAttribute : Attribute { List result = new List(); +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = _assembly == null ? CurrentAssemblies.GetLoadedAssemblies().ToArray() : new Assembly[] { _assembly }; +#else Assembly[] assemblies = _assembly == null ? AppDomain.CurrentDomain.GetAssemblies() : new Assembly[] { _assembly }; - +#endif for (int assembly = 0; assembly < assemblies.Length; assembly++) { Type[] types = assemblies[assembly].GetTypes(); @@ -576,7 +580,12 @@ public static Type[] Attribute(this HUMType.Data.With with, Assembly public static Type[] Attribute(this HUMType.Data.With with, Func predicate) where TAttribute : Attribute { List result = new List(); + +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif for (int assembly = 0; assembly < assemblies.Length; assembly++) { @@ -616,7 +625,11 @@ public static HUMType.Data.Generic Generic(this HUMType.Data.Is isData) public static Type[] Derived(this HUMType.Data.Get derived, bool includeSelf = false) { List result = new List(); +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif for (int assembly = 0; assembly < assemblies.Length; assembly++) { @@ -640,7 +653,11 @@ public static Type[] Derived(this HUMType.Data.Get derived, bool includeSelf = f public static void Derived(this HUMType.Data.Get derived, Action action, bool includeSelf = false) { List result = new List(); +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif if (includeSelf) action?.Invoke(derived.type); for (int assembly = 0; assembly < assemblies.Length; assembly++) @@ -664,7 +681,11 @@ public static void Derived(this HUMType.Data.Get derived, Action action, b public static Type[] All(this HUMType.Data.Get derived, bool includeSelf = false) { List result = new List(); +#if UNITY_6000_4_OR_NEWER + Assembly[] assemblies = CurrentAssemblies.GetLoadedAssemblies().ToArray(); +#else Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif for (int assembly = 0; assembly < assemblies.Length; assembly++) { @@ -790,6 +811,11 @@ public static string Code(this HUMValue.Data.As @as, bool isNew, bool isLiteral var value = (Color)@as.value; return Create("Color", value.r.As().Code(false, false, false, "", false, fullName), value.g.As().Code(false, false, false, "", false, fullName), value.b.As().Code(false, false, false, "", false, fullName), value.a.As().Code(false, false, false, "", false, fullName)); } + if (type == typeof(HDRColor)) + { + var value = (HDRColor)@as.value; + return Create("HDRColor", value.color.As().Code(false, false, false, "", false, fullName)); + } if (type == typeof(Gradient)) { var value = (Gradient)@as.value; @@ -920,6 +946,11 @@ private static string HighlightedCode(this HUMValue.Data.As @as, bool isNew, boo var value = (Color)@as.value; return CreateHighlighted("Color", value.r.As().Code(false, false, true, "", false, fullName), value.g.As().Code(false, false, true, "", false, fullName), value.b.As().Code(false, false, true, "", false, fullName), value.a.As().Code(false, false, true, "", false, fullName)); } + if (type == typeof(HDRColor)) + { + var value = (HDRColor)@as.value; + return CreateHighlighted("HDRColor", value.color.As().Code(false, false, true, "", false, fullName)); + } if (type == typeof(Gradient)) { var value = (Gradient)@as.value; @@ -1058,6 +1089,11 @@ public static string Code(this HUMValue.Data.As @as, bool isNew, bool isLiteral var value = (Color)@as.value; return Create("Color", value.r.As().Code(false, false, false, "", false, fullName), value.g.As().Code(false, false, false, "", false, fullName), value.b.As().Code(false, false, false, "", false, fullName), value.a.As().Code(false, false, false, "", false, fullName)); } + if (type == typeof(HDRColor)) + { + var value = (HDRColor)@as.value; + return Create("HDRColor", value.color.As().Code(false, false, false, "", false, fullName)); + } if (type == typeof(Gradient)) { var value = (Gradient)@as.value; @@ -1188,6 +1224,11 @@ private static string HighlightedCode(this HUMValue.Data.As @as, bool isNew, boo var value = (Color)@as.value; return CreateHighlighted("Color", value.r.As().Code(false, false, true, "", false, fullName), value.g.As().Code(false, false, true, "", false, fullName), value.b.As().Code(false, false, true, "", false, fullName), value.a.As().Code(false, false, true, "", false, fullName)); } + if (type == typeof(HDRColor)) + { + var value = (HDRColor)@as.value; + return CreateHighlighted("HDRColor", value.color.As().Code(false, false, true, "", false, fullName)); + } if (type == typeof(Gradient)) { var value = (Gradient)@as.value; diff --git a/Runtime/Shared/Libraries/Humility/Type/Objects/SystemType.cs b/Runtime/Shared/Libraries/Humility/Type/Objects/SystemType.cs index 41110445..d2a43ec1 100644 --- a/Runtime/Shared/Libraries/Humility/Type/Objects/SystemType.cs +++ b/Runtime/Shared/Libraries/Humility/Type/Objects/SystemType.cs @@ -10,6 +10,7 @@ public sealed class SystemType : ISerializationCallbackReceiver [Inspectable] [InspectorLabel("")] [InspectorWide] + [NonSerialized] [FullSerializer.fsProperty(Converter = typeof(FakeGenericParameterTypeConverter))] public Type type; [SerializeField][HideInInspector] diff --git a/Runtime/Shared/Libraries/Humility/Values/HUMValue_Root.cs b/Runtime/Shared/Libraries/Humility/Values/HUMValue_Root.cs index 756c22f1..b7149c8b 100644 --- a/Runtime/Shared/Libraries/Humility/Values/HUMValue_Root.cs +++ b/Runtime/Shared/Libraries/Humility/Values/HUMValue_Root.cs @@ -23,7 +23,7 @@ public static string Serialized(this object value) if (type == typeof(string)) return value + "[Type:String]"; if (type == typeof(Type)) return ((Type)value).FullName + "[Type:Type]"; if (type == typeof(UnityEngine.GameObject)) return "null"; - + return string.Empty; } @@ -33,7 +33,7 @@ public static string Serialized(this object value) public static object Deserialized(this string str) { if (str.Contains("[Type:Boolean]")) - + { if (str.Contains("true")) return true; if (str.Contains("false")) return false; @@ -59,13 +59,35 @@ public static object Deserialized(this string str) return Type.GetType(str.Replace("[Type:Type]", string.Empty)); } - if (str.Contains("[Type:GameObject")) + const string tag = "[Type:GameObject]"; + if (str.Contains(tag)) { - var parsedInt = int.Parse(str.Replace("[Type:GameObject]", string.Empty)); + string idStr = str.Replace(tag, string.Empty); + #if UNITY_EDITOR - var asset = AssetDatabase.LoadAssetAtPath(AssetDatabase.GetAssetPath(parsedInt)); - return asset; +#if UNITY_6000_5_OR_NEWER + if (ulong.TryParse(idStr, out ulong parsedULong)) + { + EntityId entityId = EntityId.FromULong(parsedULong); + string path = AssetDatabase.GetAssetPath(entityId); + return !string.IsNullOrEmpty(path) ? AssetDatabase.LoadAssetAtPath(path) : null; + } +#elif UNITY_6000_3_OR_NEWER + if (int.TryParse(idStr, out int parsedInt)) + { + EntityId entityId = (EntityId)parsedInt; + string path = AssetDatabase.GetAssetPath(entityId); + return !string.IsNullOrEmpty(path) ? AssetDatabase.LoadAssetAtPath(path) : null; + } +#else + if (int.TryParse(idStr, out int parsedInt)) + { + string path = AssetDatabase.GetAssetPath(parsedInt); + return !string.IsNullOrEmpty(path) ? AssetDatabase.LoadAssetAtPath(path) : null; + } +#endif #endif + return null; } return null; diff --git a/Runtime/Shared/Utility/DefinedEventType.cs b/Runtime/Shared/Utility/DefinedEventType.cs index c0b25521..6c8b2df5 100644 --- a/Runtime/Shared/Utility/DefinedEventType.cs +++ b/Runtime/Shared/Utility/DefinedEventType.cs @@ -9,6 +9,7 @@ namespace Unity.VisualScripting.Community public class DefinedEventType { [Inspectable] + [NonSerialized] public Type type; public DefinedEventType() diff --git a/Runtime/Shared/Utility/EditorState.cs b/Runtime/Shared/Utility/EditorState.cs index 147b4fcd..330907c9 100644 --- a/Runtime/Shared/Utility/EditorState.cs +++ b/Runtime/Shared/Utility/EditorState.cs @@ -1,5 +1,6 @@ using System; using System.Linq; +using UnityEngine.Assemblies; namespace Unity.VisualScripting.Community.Utility { @@ -15,7 +16,11 @@ static EditorState() lock (lockObject) { var type = typeof(IEditorStateFetcher); +#if UNITY_6000_4_OR_NEWER + var types = CurrentAssemblies.GetLoadedAssemblies() +#else var types = AppDomain.CurrentDomain.GetAssemblies() +#endif .SelectMany(s => s.GetTypes()) .Where(p => { diff --git a/Runtime/Shared/Utility/HDRColor.cs b/Runtime/Shared/Utility/HDRColor.cs index 00fa2a15..1ee86db8 100644 --- a/Runtime/Shared/Utility/HDRColor.cs +++ b/Runtime/Shared/Utility/HDRColor.cs @@ -15,6 +15,11 @@ public struct HDRColor [ColorUsage(true, true)] public Color color; + public HDRColor(Color color) + { + this.color = color; + } + public static implicit operator Color(HDRColor hdrColor) { return hdrColor.color; @@ -24,7 +29,7 @@ public static implicit operator HDRColor(Color color) { return new HDRColor { color = color }; } - + public override string ToString() { return color.ToString(); diff --git a/Runtime/Shared/Utility/MemberUtility.cs b/Runtime/Shared/Utility/MemberUtility.cs index c2825c65..63f4cc25 100644 --- a/Runtime/Shared/Utility/MemberUtility.cs +++ b/Runtime/Shared/Utility/MemberUtility.cs @@ -18,34 +18,41 @@ public static Member ToManipulatorSafe(this MemberInfo memberInfo, Type targetTy if (memberInfo is EventInfo) return null; - if (memberInfo is FieldInfo fieldInfo) + try { - if (!nonPublic && !fieldInfo.IsPublic) return null; - return fieldInfo.ToManipulator(targetType); - } + if (memberInfo is FieldInfo fieldInfo) + { + if (!nonPublic && !fieldInfo.IsPublic) return null; + return fieldInfo.ToManipulator(targetType); + } - if (memberInfo is PropertyInfo propertyInfo) - { - if (propertyInfo.GetIndexParameters().Length > 0) return null; + if (memberInfo is PropertyInfo propertyInfo) + { + if (propertyInfo.GetIndexParameters().Length > 0) return null; - var getter = propertyInfo.GetGetMethod(nonPublic); - var setter = propertyInfo.GetSetMethod(nonPublic); - if (getter == null && setter == null) return null; + var getter = propertyInfo.GetGetMethod(nonPublic); + var setter = propertyInfo.GetSetMethod(nonPublic); + if (getter == null && setter == null) return null; - return propertyInfo.ToManipulator(targetType); - } + return propertyInfo.ToManipulator(targetType); + } - if (memberInfo is MethodInfo methodInfo) - { - if (methodInfo.IsSpecialName) return null; - if (!nonPublic && !methodInfo.IsPublic) return null; - return methodInfo.ToManipulator(targetType); - } + if (memberInfo is MethodInfo methodInfo) + { + if (methodInfo.IsSpecialName) return null; + if (!nonPublic && !methodInfo.IsPublic) return null; + return methodInfo.ToManipulator(targetType); + } - if (memberInfo is ConstructorInfo ctorInfo) + if (memberInfo is ConstructorInfo ctorInfo) + { + if (!nonPublic && !ctorInfo.IsPublic) return null; + return ctorInfo.ToManipulator(targetType); + } + } + catch (MissingMemberException) { - if (!nonPublic && !ctorInfo.IsPublic) return null; - return ctorInfo.ToManipulator(targetType); + return null; } return null; diff --git a/Runtime/Shared/Utility/TypeParam.cs b/Runtime/Shared/Utility/TypeParam.cs index 54d28b3b..afb0e0d4 100644 --- a/Runtime/Shared/Utility/TypeParam.cs +++ b/Runtime/Shared/Utility/TypeParam.cs @@ -14,6 +14,7 @@ public sealed class TypeParam : ISerializationCallbackReceiver { [SerializeField] [Inspectable] + [NonSerialized] [FullSerializer.fsProperty(Converter = typeof(FakeGenericParameterTypeConverter))] public Type type = typeof(object); @@ -43,6 +44,7 @@ public sealed class TypeParam : ISerializationCallbackReceiver [Serialize] [SerializeField] [InspectorToggleLeft] + [NonSerialized] public object defaultValue; #if VISUAL_SCRIPTING_1_7 public SerializableType typeHandle;