{"id":455269,"date":"2025-04-09T15:00:29","date_gmt":"2025-04-09T15:00:29","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=455269"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=455269","title":{"rendered":"<span>\u0414\u0435\u043b\u0430\u0435\u043c \u0441\u0432\u043e\u044e Blueprint K2 Node \u0432 Unreal Engine<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e6f\/bf0\/3e0\/e6fbf03e0e56a6670a6d70875a9c240d.png\" alt=\"\u0421\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u0432 \u043a\u043e\u043d\u0446\u0435 \u0433\u0430\u0439\u0434\u0430 \u043d\u043e\u0434\u0430.\" title=\"\u0421\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u0432 \u043a\u043e\u043d\u0446\u0435 \u0433\u0430\u0439\u0434\u0430 \u043d\u043e\u0434\u0430.\" width=\"534\" height=\"171\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e6f\/bf0\/3e0\/e6fbf03e0e56a6670a6d70875a9c240d.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e6f\/bf0\/3e0\/e6fbf03e0e56a6670a6d70875a9c240d.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u0432 \u043a\u043e\u043d\u0446\u0435 \u0433\u0430\u0439\u0434\u0430 \u043d\u043e\u0434\u0430.<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u043d\u0430\u0434\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 blueprints, \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f <code>wildcard<\/code>.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0431\u0435\u0433\u043d\u0443\u0442\u044c \u043a \u0440\u0443\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u043f\u0438\u0441\u043a\u0435 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 <code>UFUNCTION<\/code>. \u041e\u0434\u043d\u0430\u043a\u043e, \u0443 \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0432 \u0434\u0432\u0438\u0436\u043a\u0435 \u0435\u0441\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0440\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u2013 <code>UK2Node<\/code>. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0434\u0432\u0438\u0436\u043a\u043e\u0432\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f0f\/caa\/fbe\/f0fcaafbebd749e2b3317a54a81935a6.png\" alt=\"K2 \u043d\u043e\u0434\u044b \u0432 Unreal Engine\" title=\"K2 \u043d\u043e\u0434\u044b \u0432 Unreal Engine\" width=\"548\" height=\"319\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f0f\/caa\/fbe\/f0fcaafbebd749e2b3317a54a81935a6.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f0f\/caa\/fbe\/f0fcaafbebd749e2b3317a54a81935a6.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>K2 \u043d\u043e\u0434\u044b \u0432 Unreal Engine<\/figcaption><\/div>\n<\/figure>\n<hr\/>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 K2 Node<\/h2>\n<p><strong>\u0412\u0410\u0416\u041d\u041e! \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043d\u043e\u0434\u0430\u043c\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0432 uncooked \u043c\u043e\u0434\u0443\u043b\u0435.<\/strong><\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e <code>UK2Node<\/code> \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0440\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0441\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0434\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438. <\/p>\n<p>\u0427\u0442\u043e \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442? \u0412\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u0430\u043c\u0438\u043c:<\/p>\n<ol>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0438\u043d.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0438\u043f \u043f\u0438\u043d\u0430 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0442\u0438\u043f \u043f\u0438\u043d\u0430 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0434\u0443 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u043c \u043c\u0435\u043d\u044e.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c\/\u0443\u0434\u0430\u043b\u044f\u0442\u044c\/\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043f\u0438\u043d\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435(\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e).<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435(\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e).<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0438\u043d\u0430(\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e).<\/p>\n<\/li>\n<\/ol>\n<p>\u0417\u0432\u0443\u0447\u0438\u0442 \u043a\u0430\u043a \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435(\u0442\u0430\u043a \u0438 \u0435\u0441\u0442\u044c), \u043d\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0432\u044b\u0431\u043e\u0440\u0430 \u043d\u0435\u0442. \u0417\u0430\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<hr\/>\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441<\/h2>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <code>Input Action Value<\/code> \u0438 \u0441\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442 <code>Action Value<\/code>, \u0430 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043d\u0430\u043c \u0442\u0438\u043f\u0430. \u0415\u0441\u043b\u0438 \u043d\u0430\u0448\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 <code>float<\/code>, \u0442\u043e \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c float, \u0435\u0441\u043b\u0438 <code>bool<\/code>, \u0442\u043e <code>bool<\/code>, \u0438 \u0442.\u0434.<\/p>\n<p>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c.<\/p>\n<p><code>.h<\/code> \u0444\u0430\u0439\u043b<\/p>\n<pre><code class=\"cpp\">#pragma once  #include \"CoreMinimal.h\" #include \"K2Node.h\" #include \"K2Node_GetInputValue.generated.h\"  UCLASS() class UK2Node_GetInputValue : public UK2Node { GENERATED_BODY()  public: \/\/~UEdGraphNode interface virtual void PostReconstructNode() override; virtual void PinDefaultValueChanged(UEdGraphPin* ChangedPin) override; virtual void ExpandNode(FKismetCompilerContext&amp; CompilerContext, UEdGraph* SourceGraph) override; \/\/~End of UEdGraphNode interface  \/\/~UK2Node interface virtual void AllocateDefaultPins() override; virtual void GetMenuActions(FBlueprintActionDatabaseRegistrar&amp; ActionRegistrar) const override; virtual bool IsNodePure() const override { return true; }  \/\/ \u0417\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043d\u0430 \u043d\u043e\u0434\u0443 virtual FText GetTooltipText() const override { return NSLOCTEXT(\"K2Node\", \"GetInputValue\", \"Extract input value with type from action.\"); }  \/\/ \u041f\u0438\u0448\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override { return NSLOCTEXT(\"K2Node\", \"GetInputValue\", \"Get Input Value\"); }  \/\/ \u041f\u0438\u0448\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0448\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f virtual FText GetMenuCategory() const override { return NSLOCTEXT(\"K2Node\", \"InputCategory\", \"Enhanced Input\"); } \/\/~End of UK2Node interface  private: void RefreshOutputPinType();  \/\/ \u041f\u0440\u043e\u0441\u0442\u043e \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 UEdGraphPin* GetActionValuePin() const { return FindPinChecked(TEXT(\"ActionValue\")); } UEdGraphPin* GetActionPin() const { return FindPinChecked(TEXT(\"Action\")); } UEdGraphPin* GetOutputPin() const { return FindPinChecked(TEXT(\"Value\")); } };<\/code><\/pre>\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u0438\u043d\u044b<\/h2>\n<p><code>AllocateDefaultPins<\/code><\/p>\n<p>\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u0430\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0438\u043d\u043e\u0432. \u0412 \u043d\u0435\u0439 \u043c\u044b \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u0422\u0443\u0442 \u043c\u044b \u0441\u0440\u0430\u0437\u0443 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u0445 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043d\u043e\u0434\u044b \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0432 blueprint graph.<\/p>\n<pre><code class=\"cpp\">void UK2Node_GetInputValue::AllocateDefaultPins() { \/** Creates input pins for ActionValue and Action, and an output pin for Value. *\/  \/\/ Action value pin UEdGraphPin* ActionValuePin = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Struct, FInputActionValue::StaticStruct(),                                         TEXT(\"ActionValue\")); ActionValuePin-&gt;PinToolTip = TEXT(\"Value received from the input system for the specified action.\");  \/\/ Action object pin UEdGraphPin* ActionPin = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Object, UInputAction::StaticClass(),                                    TEXT(\"Action\")); ActionPin-&gt;PinToolTip = TEXT( \"Input action to extract the expected value type from (used to determine output type).\");  \/\/ Output action value type pin UEdGraphPin* ValuePin = CreatePin(EGPD_Output, UEdGraphSchema_K2::PC_Wildcard, TEXT(\"Value\")); ValuePin-&gt;PinToolTip = TEXT( \"The extracted value of the input action, matching the expected type (bool, float, or Vector2D).\");  Super::AllocateDefaultPins(); }<\/code><\/pre>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0442\u0443\u0442 \u0435\u0441\u0442\u044c? \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 3 \u043f\u0438\u043d\u0430:<\/p>\n<ol>\n<li>\n<p>\u0412\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0438\u043d \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b Input Action Value.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0438\u043d \u0441\u0430\u043c\u043e\u0433\u043e Input Action.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0438\u043d \u0442\u0438\u043f\u0430 wildcard, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0435\u043d\u044f\u0442\u044c.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a\u0436\u0435, \u0441\u0440\u0430\u0437\u0443 \u0434\u0430\u0435\u043c \u0438\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0441\u0432\u0435\u0442\u0438\u0442\u0441\u044f \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043d\u0430 \u043d\u0438\u0445 \u043a\u0443\u0440\u0441\u043e\u0440\u043e\u043c.<\/p>\n<h2>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0442\u0438\u043f \u043f\u0438\u043d\u043e\u0432<\/h2>\n<p><code>PostReconstructNode<\/code> \u0438 <code>PinDefaultValueChanged<\/code><\/p>\n<p>\u042d\u0442\u0438 2 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043f\u0443\u043d\u043a\u0442\u0430 \u043f\u0440\u043e \u0440\u0443\u0447\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043f\u0438\u043d\u043e\u0432. \u041e\u043d\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0440\u0435\u043a\u043e\u043d\u0441\u0442\u0440\u0430\u043a\u0442\u0435 \u0438 \u0440\u0443\u0447\u043d\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043f\u0438\u043d\u043e\u0432 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435. \u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 <code>private<\/code> \u0441\u0435\u043a\u0446\u0438\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>RefreshOutputPinType<\/code>. \u0422.\u043a. \u0435\u0451 \u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445.<\/p>\n<pre><code class=\"cpp\">void UK2Node_GetInputValue::PostReconstructNode() { Super::PostReconstructNode();  RefreshOutputPinType(); }  void UK2Node_GetInputValue::PinDefaultValueChanged(UEdGraphPin* ChangedPin) { if (ChangedPin == GetActionPin()) { RefreshOutputPinType(); } }  void UK2Node_GetInputValue::RefreshOutputPinType() { \/** Updates the output pin type based on the selected Action's ValueType. *\/ UEdGraphPin* OutputPin = GetOutputPin(); if (!OutputPin) return;  OutputPin-&gt;Modify();  \/\/ Resets pin type before updating OutputPin-&gt;PinType = FEdGraphPinType();  const UEdGraphPin* ActionPin = GetActionPin(); if (!ActionPin || !ActionPin-&gt;DefaultObject) { OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Wildcard; return; }  const UInputAction* InputAction = Cast&lt;UInputAction&gt;(ActionPin-&gt;DefaultObject); if (!InputAction) return;  switch (InputAction-&gt;ValueType) { case EInputActionValueType::Boolean: OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Boolean; break; case EInputActionValueType::Axis1D: OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Real; OutputPin-&gt;PinType.PinSubCategory = TEXT(\"double\"); break; case EInputActionValueType::Axis2D: OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Struct; OutputPin-&gt;PinType.PinSubCategoryObject = TBaseStructure&lt;FVector2D&gt;::Get(); break; case EInputActionValueType::Axis3D: OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Struct; OutputPin-&gt;PinType.PinSubCategoryObject = TBaseStructure&lt;FVector&gt;::Get(); break; default: OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Wildcard; break; }  \/\/ Notifies the system about pin type changes GetSchema()-&gt;ForceVisualizationCacheClear(); GetGraph()-&gt;NotifyGraphChanged(); }<\/code><\/pre>\n<p>\u041a \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0432\u0443\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c \u043e\u0441\u043e\u0431\u043e \u0443\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0447\u0435\u0433\u043e. \u0420\u0430\u0437\u0432\u0435 \u0447\u0442\u043e \u0432 <code>PinDefaultValueChanged<\/code> \u043c\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0448 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0438\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>Input Action<\/code>, \u0442.\u043a. \u0441 \u043d\u0435\u0433\u043e \u043c\u044b \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0430\u0448 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0442\u0438\u043f.<\/p>\n<p><code>RefreshOutputPinType<\/code><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0438 \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0433\u043e(\u0432\u0430\u0436\u043d\u043e) \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"cpp\">OutputPin-&gt;Modify(); OutputPin-&gt;PinType = FEdGraphPinType();<\/code><\/pre>\n<p>\u0413\u043e\u0432\u043e\u0440\u0438\u043c \u0434\u0432\u0438\u0436\u043a\u0443, \u0447\u0442\u043e \u043c\u044b \u043c\u0435\u043d\u044f\u0435\u043c \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0438\u043d(\u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b undo\/redo), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0442\u0438\u043f \u043f\u0435\u0440\u0435\u0434 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430, <code>Input Action<\/code>, \u0442\u0438\u043f \u0435\u0433\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u043d\u0430 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0442\u0438\u043f \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0438\u043d\u0430. \u0422.\u043a. \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0439 switch, \u0442\u043e \u0441\u0434\u0435\u043b\u0430\u044e \u0430\u043a\u0446\u0435\u043d\u0442 \u043b\u0438\u0448\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0442\u0440\u0435\u0445 \u043f\u043e\u043b\u044f\u0445.<\/p>\n<pre><code class=\"cpp\">OutputPin-&gt;PinType.PinCategory OutputPin-&gt;PinType.PinSubCategoryObject OutputPin-&gt;PinType.PinSubCategory<\/code><\/pre>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0438 \u0437\u0430\u0434\u0430\u0435\u043c \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d \u0432 blueprint graph.<\/p>\n<pre><code class=\"cpp\">GetSchema()-&gt;ForceVisualizationCacheClear(); GetGraph()-&gt;NotifyGraphChanged();<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u043c\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c &#171;\u0440\u0435\u043d\u0434\u0435\u0440&#187;, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448\u0430 \u043d\u043e\u0434\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u043c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e blueprint \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0438 \u043d\u0430\u0434\u043e \u0431\u044b \u0435\u0433\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<h2>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043d\u043e\u0434\u0443 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u043c \u043c\u0435\u043d\u044e<\/h2>\n<pre><code class=\"cpp\">virtual FText GetMenuCategory() const override { return NSLOCTEXT(\"K2Node\", \"InputCategory\", \"Enhanced Input\"); }<\/code><\/pre>\n<pre><code class=\"cpp\">void UK2Node_GetInputValue::GetMenuActions(FBlueprintActionDatabaseRegistrar&amp; ActionRegistrar) const { \/** Registers this node in the blueprint action database. *\/ if (!ActionRegistrar.IsOpenForRegistration(GetClass())) return;  UBlueprintNodeSpawner* NodeSpawner = UBlueprintNodeSpawner::Create(GetClass()); check(NodeSpawner != nullptr);  NodeSpawner-&gt;NodeClass = GetClass();  ActionRegistrar.AddBlueprintAction(GetClass(), NodeSpawner); }<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448\u0443 \u043d\u043e\u0434\u0443 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u043c \u043c\u0435\u043d\u044e \u0431\u043b\u0443\u043f\u0440\u0438\u043d\u0442\u0430.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/819\/df4\/755\/819df475538fdb2b5c7f2b4720a6a6c4.png\" alt=\"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438\" title=\"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438\" width=\"408\" height=\"118\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/819\/df4\/755\/819df475538fdb2b5c7f2b4720a6a6c4.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/819\/df4\/755\/819df475538fdb2b5c7f2b4720a6a6c4.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438<\/figcaption><\/div>\n<\/figure>\n<h2>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f<\/h2>\n<pre><code class=\"cpp\">void UK2Node_GetInputValue::ExpandNode(FKismetCompilerContext&amp; CompilerContext, UEdGraph* SourceGraph) { \/** Expands the node into a function call from UEnhancedInputLibrary. *\/ Super::ExpandNode(CompilerContext, SourceGraph);  UEdGraphPin* ActionValuePin = GetActionValuePin(); const UEdGraphPin* ActionPin = GetActionPin(); UEdGraphPin* OutputPin = GetOutputPin();  if (!ActionValuePin || !OutputPin) { CompilerContext.MessageLog.Error( *LOCTEXT(\"MissingPins\", \"GetInputValue: Missing pins\").ToString(), this); return; }  if (!ActionPin || !ActionPin-&gt;DefaultObject) { CompilerContext.MessageLog.Error( *LOCTEXT(\"InvalidInputAction\", \"GetInputValue: Action pin is invalid or not set\").ToString(), this); return; }  const UInputAction* InputAction = Cast&lt;UInputAction&gt;(ActionPin-&gt;DefaultObject); if (!InputAction) { CompilerContext.MessageLog.Error( *LOCTEXT(\"InvalidInputAction\", \"GetInputValue: Action pin does not contain a valid InputAction\").ToString(), this); return; }  \/\/ Determines which function to call based on ValueType FName FunctionName; FName ActionValueName = TEXT(\"InValue\"); switch (InputAction-&gt;ValueType) { case EInputActionValueType::Boolean: FunctionName = GET_FUNCTION_NAME_CHECKED(UEnhancedInputLibrary, Conv_InputActionValueToBool); break; case EInputActionValueType::Axis1D: FunctionName = GET_FUNCTION_NAME_CHECKED(UEnhancedInputLibrary, Conv_InputActionValueToAxis1D); break; case EInputActionValueType::Axis2D: FunctionName = GET_FUNCTION_NAME_CHECKED(UEnhancedInputLibrary, Conv_InputActionValueToAxis2D); break; case EInputActionValueType::Axis3D: FunctionName = GET_FUNCTION_NAME_CHECKED(UEnhancedInputLibrary, Conv_InputActionValueToAxis3D); ActionValueName = TEXT(\"ActionValue\"); break; default: CompilerContext.MessageLog.Error( *LOCTEXT(\"UnsupportedType\", \"GetInputValue: Unsupported Action Value Type\").ToString(), this); return; }  if (OutputPin-&gt;PinType.PinCategory == UEdGraphSchema_K2::PC_Wildcard) { CompilerContext.MessageLog.Error( *LOCTEXT(\"WildcardError\", \"GetInputValue: Output pin type is still Wildcard!\").ToString(), this); return; }  UE_LOG(LogTemp, Warning, TEXT(\"OutputPin Type: %s\"), *OutputPin-&gt;PinType.PinCategory.ToString());  \/\/ Creates a CallFunction node for the selected function UK2Node_CallFunction* GetValueNode = CompilerContext.SpawnIntermediateNode&lt;UK2Node_CallFunction&gt;(this, SourceGraph); if (!GetValueNode) { CompilerContext.MessageLog.Error( *LOCTEXT(\"NodeSpawnError\", \"GetInputValue: Failed to create intermediate function node\").ToString(), this); return; } GetValueNode-&gt;FunctionReference.SetExternalMember(FunctionName, UEnhancedInputLibrary::StaticClass()); GetValueNode-&gt;AllocateDefaultPins();  \/\/ Ensures the function has the correct input pin UEdGraphPin* InValuePin = GetValueNode-&gt;FindPin(ActionValueName); if (!InValuePin) { CompilerContext.MessageLog.Error( *LOCTEXT(\"MissingInputPin\", \"GetInputValue: Could not find expected input pin on GetValueNode\").ToString(), this); return; }  \/\/ Moves links from ActionValuePin -&gt; InValuePin CompilerContext.MovePinLinksToIntermediate(*ActionValuePin, *InValuePin);  \/\/ Moves links from OutputPin -&gt; GetValueNode output CompilerContext.MovePinLinksToIntermediate(*OutputPin, *GetValueNode-&gt;GetReturnValuePin());  \/\/ Breaks all links on this node since it's no longer needed BreakAllNodeLinks(); }<\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u044b \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448\u0443 \u043d\u043e\u0434\u0443 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u043e\u0434(\u043b\u0438\u0431\u043e \u0434\u0430\u0436\u0435 \u043d\u0430 \u043e\u0434\u043d\u0443), \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0443\u0436\u0435 \u0438 \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u043d\u0430\u0448\u0438 \u043f\u0438\u043d\u044b. \u0414\u0430, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 K2 \u043d\u043e\u0434\u044b \u0441\u043a\u0440\u044b\u0442\u043d\u043e \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u0446\u0435\u043b\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0434\u0440\u0443\u0433\u0438\u0445. \u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 <code>BlueprintInternalUseOnly<\/code> \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u0437 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0438\u043d\u043f\u0443\u0442\u043e\u0432.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0438\u0445 \u043f\u0438\u043d\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0434\u0443 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0433\u0440\u0430\u0444\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0438\u0445 \u043f\u0438\u043d\u043e\u0432 \u043d\u0430 \u043f\u0438\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u043d\u043e\u0439 \u043d\u043e\u0434\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0440\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0441\u0432\u044f\u0437\u0438 \u043d\u0430\u0448\u0435\u0439 \u043d\u043e\u0434\u044b.<\/p>\n<\/li>\n<\/ol>\n<h2>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/h2>\n<pre><code class=\"cpp\">virtual bool IsNodePure() const override { return true; }  virtual FText GetTooltipText() const override {     return NSLOCTEXT(\"K2Node\", \"GetInputValue\", \"Extract input value with type from action.\"); }  virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override {     return NSLOCTEXT(\"K2Node\", \"GetInputValue\", \"Get Input Value\"); }<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c, pure \u043d\u0430\u0448\u0430 \u043d\u043e\u0434\u0430 \u0438\u043b\u0438 impure(\u0438\u043c\u0435\u0435\u0442 execution \u043f\u0438\u043d\u044b \u0438\u043b\u0438 \u043d\u0435\u0442), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438.<\/p>\n<p>\u041f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e, \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0446\u0432\u0435\u0442\u0430 \u0432\u0441\u0435\u0433\u043e \u0438 \u0432\u0441\u044f.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/616\/df2\/39f\/616df239fba4aaaf86dd0507d85c3092.png\" alt=\"\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0446\u0432\u0435\u0442\u043e\u043c\" title=\"\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0446\u0432\u0435\u0442\u043e\u043c\" width=\"332\" height=\"71\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/616\/df2\/39f\/616df239fba4aaaf86dd0507d85c3092.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/616\/df2\/39f\/616df239fba4aaaf86dd0507d85c3092.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0446\u0432\u0435\u0442\u043e\u043c<\/figcaption><\/div>\n<\/figure>\n<hr\/>\n<h2>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434<\/h2>\n<p><code>.h<\/code> \u0444\u0430\u0439\u043b(\u0434\u0430, \u0435\u0449\u0435 \u0440\u0430\u0437)<\/p>\n<pre><code class=\"cpp\">#pragma once  #include \"CoreMinimal.h\" #include \"K2Node.h\" #include \"K2Node_GetInputValue.generated.h\"  UCLASS() class UK2Node_GetInputValue : public UK2Node { GENERATED_BODY()  public: \/\/~UEdGraphNode interface virtual void PostReconstructNode() override; virtual void PinDefaultValueChanged(UEdGraphPin* ChangedPin) override; virtual void ExpandNode(FKismetCompilerContext&amp; CompilerContext, UEdGraph* SourceGraph) override; \/\/~End of UEdGraphNode interface  \/\/~UK2Node interface virtual void AllocateDefaultPins() override; virtual void GetMenuActions(FBlueprintActionDatabaseRegistrar&amp; ActionRegistrar) const override; virtual bool IsNodePure() const override { return true; }  virtual FText GetTooltipText() const override { return NSLOCTEXT(\"K2Node\", \"GetInputValue\", \"Extract input value with type from action.\"); }  virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override { return NSLOCTEXT(\"K2Node\", \"GetInputValue\", \"Get Input Value\"); }  virtual FText GetMenuCategory() const override { return NSLOCTEXT(\"K2Node\", \"InputCategory\", \"Enhanced Input\"); } \/\/~End of UK2Node interface  private: void RefreshOutputPinType();  UEdGraphPin* GetActionValuePin() const { return FindPinChecked(TEXT(\"ActionValue\")); } UEdGraphPin* GetActionPin() const { return FindPinChecked(TEXT(\"Action\")); } UEdGraphPin* GetOutputPin() const { return FindPinChecked(TEXT(\"Value\")); } }; <\/code><\/pre>\n<p><code>.cpp<\/code> \u0444\u0430\u0439\u043b<\/p>\n<pre><code class=\"cpp\">#include \"K2\/K2Node_GetInputValue.h\"  #include \"BlueprintActionDatabaseRegistrar.h\" #include \"BlueprintNodeSpawner.h\" #include \"InputAction.h\" #include \"InputActionValue.h\" #include \"KismetCompiler.h\" #include \"K2Node_CallFunction.h\" #include \"EnhancedInputLibrary.h\"  #include UE_INLINE_GENERATED_CPP_BY_NAME(K2Node_GetInputValue)  #define LOCTEXT_NAMESPACE \"K2Node\"  void UK2Node_GetInputValue::PostReconstructNode() { Super::PostReconstructNode();  RefreshOutputPinType(); }  void UK2Node_GetInputValue::PinDefaultValueChanged(UEdGraphPin* ChangedPin) { if (ChangedPin == GetActionPin()) { RefreshOutputPinType(); } }  void UK2Node_GetInputValue::AllocateDefaultPins() { \/** Creates input pins for ActionValue and Action, and an output pin for Value. *\/  \/\/ Action value pin UEdGraphPin* ActionValuePin = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Struct, FInputActionValue::StaticStruct(),                                         TEXT(\"ActionValue\")); ActionValuePin-&gt;PinToolTip = TEXT(\"Value received from the input system for the specified action.\");  \/\/ Action object pin UEdGraphPin* ActionPin = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Object, UInputAction::StaticClass(),                                    TEXT(\"Action\")); ActionPin-&gt;PinToolTip = TEXT( \"Input action to extract the expected value type from (used to determine output type).\");  \/\/ Output action value type pin UEdGraphPin* ValuePin = CreatePin(EGPD_Output, UEdGraphSchema_K2::PC_Wildcard, TEXT(\"Value\")); ValuePin-&gt;PinToolTip = TEXT( \"The extracted value of the input action, matching the expected type (bool, float, or Vector2D).\");  Super::AllocateDefaultPins(); }  void UK2Node_GetInputValue::GetMenuActions(FBlueprintActionDatabaseRegistrar&amp; ActionRegistrar) const { \/** Registers this node in the blueprint action database. *\/ if (!ActionRegistrar.IsOpenForRegistration(GetClass())) return;  UBlueprintNodeSpawner* NodeSpawner = UBlueprintNodeSpawner::Create(GetClass()); check(NodeSpawner != nullptr);  NodeSpawner-&gt;NodeClass = GetClass();  ActionRegistrar.AddBlueprintAction(GetClass(), NodeSpawner); }  void UK2Node_GetInputValue::RefreshOutputPinType() { \/** Updates the output pin type based on the selected Action's ValueType. *\/ UEdGraphPin* OutputPin = GetOutputPin(); if (!OutputPin) return;  OutputPin-&gt;Modify();  \/\/ Resets pin type before updating OutputPin-&gt;PinType = FEdGraphPinType();  const UEdGraphPin* ActionPin = GetActionPin(); if (!ActionPin || !ActionPin-&gt;DefaultObject) { OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Wildcard; return; }  const UInputAction* InputAction = Cast&lt;UInputAction&gt;(ActionPin-&gt;DefaultObject); if (!InputAction) return;  switch (InputAction-&gt;ValueType) { case EInputActionValueType::Boolean: OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Boolean; break; case EInputActionValueType::Axis1D: OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Real; OutputPin-&gt;PinType.PinSubCategory = TEXT(\"double\"); break; case EInputActionValueType::Axis2D: OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Struct; OutputPin-&gt;PinType.PinSubCategoryObject = TBaseStructure&lt;FVector2D&gt;::Get(); break; case EInputActionValueType::Axis3D: OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Struct; OutputPin-&gt;PinType.PinSubCategoryObject = TBaseStructure&lt;FVector&gt;::Get(); break; default: OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Wildcard; break; }  \/\/ Notifies the system about pin type changes GetSchema()-&gt;ForceVisualizationCacheClear(); GetGraph()-&gt;NotifyGraphChanged(); }  void UK2Node_GetInputValue::ExpandNode(FKismetCompilerContext&amp; CompilerContext, UEdGraph* SourceGraph) { \/** Expands the node into a function call from UEnhancedInputLibrary. *\/ Super::ExpandNode(CompilerContext, SourceGraph);  UEdGraphPin* ActionValuePin = GetActionValuePin(); const UEdGraphPin* ActionPin = GetActionPin(); UEdGraphPin* OutputPin = GetOutputPin();  if (!ActionValuePin || !OutputPin) { CompilerContext.MessageLog.Error( *LOCTEXT(\"MissingPins\", \"GetInputValue: Missing pins\").ToString(), this); return; }  if (!ActionPin || !ActionPin-&gt;DefaultObject) { CompilerContext.MessageLog.Error( *LOCTEXT(\"InvalidInputAction\", \"GetInputValue: Action pin is invalid or not set\").ToString(), this); return; }  const UInputAction* InputAction = Cast&lt;UInputAction&gt;(ActionPin-&gt;DefaultObject); if (!InputAction) { CompilerContext.MessageLog.Error( *LOCTEXT(\"InvalidInputAction\", \"GetInputValue: Action pin does not contain a valid InputAction\").ToString(), this); return; }  \/\/ Determines which function to call based on ValueType FName FunctionName; FName ActionValueName = TEXT(\"InValue\"); switch (InputAction-&gt;ValueType) { case EInputActionValueType::Boolean: FunctionName = GET_FUNCTION_NAME_CHECKED(UEnhancedInputLibrary, Conv_InputActionValueToBool); break; case EInputActionValueType::Axis1D: FunctionName = GET_FUNCTION_NAME_CHECKED(UEnhancedInputLibrary, Conv_InputActionValueToAxis1D); break; case EInputActionValueType::Axis2D: FunctionName = GET_FUNCTION_NAME_CHECKED(UEnhancedInputLibrary, Conv_InputActionValueToAxis2D); break; case EInputActionValueType::Axis3D: FunctionName = GET_FUNCTION_NAME_CHECKED(UEnhancedInputLibrary, Conv_InputActionValueToAxis3D); ActionValueName = TEXT(\"ActionValue\"); break; default: CompilerContext.MessageLog.Error( *LOCTEXT(\"UnsupportedType\", \"GetInputValue: Unsupported Action Value Type\").ToString(), this); return; }  if (OutputPin-&gt;PinType.PinCategory == UEdGraphSchema_K2::PC_Wildcard) { CompilerContext.MessageLog.Error( *LOCTEXT(\"WildcardError\", \"GetInputValue: Output pin type is still Wildcard!\").ToString(), this); return; }  UE_LOG(LogTemp, Warning, TEXT(\"OutputPin Type: %s\"), *OutputPin-&gt;PinType.PinCategory.ToString());  \/\/ Creates a CallFunction node for the selected function UK2Node_CallFunction* GetValueNode = CompilerContext.SpawnIntermediateNode&lt;UK2Node_CallFunction&gt;(this, SourceGraph); if (!GetValueNode) { CompilerContext.MessageLog.Error( *LOCTEXT(\"NodeSpawnError\", \"GetInputValue: Failed to create intermediate function node\").ToString(), this); return; } GetValueNode-&gt;FunctionReference.SetExternalMember(FunctionName, UEnhancedInputLibrary::StaticClass()); GetValueNode-&gt;AllocateDefaultPins();  \/\/ Ensures the function has the correct input pin UEdGraphPin* InValuePin = GetValueNode-&gt;FindPin(ActionValueName); if (!InValuePin) { CompilerContext.MessageLog.Error( *LOCTEXT(\"MissingInputPin\", \"GetInputValue: Could not find expected input pin on GetValueNode\").ToString(), this); return; }  \/\/ Moves links from ActionValuePin -&gt; InValuePin CompilerContext.MovePinLinksToIntermediate(*ActionValuePin, *InValuePin);  \/\/ Moves links from OutputPin -&gt; GetValueNode output CompilerContext.MovePinLinksToIntermediate(*OutputPin, *GetValueNode-&gt;GetReturnValuePin());  \/\/ Breaks all links on this node since it's no longer needed BreakAllNodeLinks(); }  #undef LOCTEXT_NAMESPACE <\/code><\/pre>\n<p><code>.build.cs<\/code> \u0444\u0430\u0439\u043b<\/p>\n<pre><code class=\"cs\">using UnrealBuildTool;  public class MyModuleUncooked : ModuleRules { public MyModuleUncooked(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;  PublicDependencyModuleNames.AddRange( new string[] { \"BlueprintGraph\", \"EnhancedInput\" } );  PrivateDependencyModuleNames.AddRange( new string[] { \"Core\", \"CoreUObject\", \"Engine\", \"KismetCompiler\", \"UnrealEd\" } ); } }<\/code><\/pre>\n<hr\/>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0439 K2 \u043d\u043e\u0434\u044b \u0432 Unreal Engine \u2014 \u043d\u0435 \u0442\u0430\u043a\u0430\u044f \u0443\u0436 \u0442\u044f\u0436\u0435\u043b\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u043d\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043b\u043e\u0447\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0434\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u0440\u043e\u0448\u043b\u0438 \u0432\u0435\u0441\u044c \u043f\u0443\u0442\u044c: \u043e\u0442 \u0438\u0434\u0435\u0438 \u0434\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0439 <code>GetInputValue<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u043c\u0435\u0435\u0442 \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c <code>InputAction<\/code> \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u043d\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0441\u0430\u043c\u0438\u043c \u0432\u043e\u0437\u0438\u0442\u044c\u0441\u044f \u0441 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0435\u0439.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/248\/388\/8df\/2483888dfaf70c99e1c45808c01d7311.png\" width=\"297\" height=\"140\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/248\/388\/8df\/2483888dfaf70c99e1c45808c01d7311.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/248\/388\/8df\/2483888dfaf70c99e1c45808c01d7311.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/acb\/43b\/2e9\/acb43b2e948aa452d3c8d0f86fe32abb.png\" width=\"305\" height=\"129\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/acb\/43b\/2e9\/acb43b2e948aa452d3c8d0f86fe32abb.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/acb\/43b\/2e9\/acb43b2e948aa452d3c8d0f86fe32abb.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/36c\/05a\/57d\/36c05a57d602c82b4f784ab78f8e5b0e.png\" width=\"305\" height=\"126\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/36c\/05a\/57d\/36c05a57d602c82b4f784ab78f8e5b0e.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/36c\/05a\/57d\/36c05a57d602c82b4f784ab78f8e5b0e.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043b\u0430\u0441\u0441\u0443 UK2Node \u043c\u043e\u0436\u043d\u043e \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0431\u043b\u0443\u043f\u0440\u0438\u043d\u0442\u043e\u0432, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/899108\/\"> https:\/\/habr.com\/ru\/articles\/899108\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u0432 \u043a\u043e\u043d\u0446\u0435 \u0433\u0430\u0439\u0434\u0430 \u043d\u043e\u0434\u0430.<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u043d\u0430\u0434\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 blueprints, \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f <code>wildcard<\/code>.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0431\u0435\u0433\u043d\u0443\u0442\u044c \u043a \u0440\u0443\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u043f\u0438\u0441\u043a\u0435 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 <code>UFUNCTION<\/code>. \u041e\u0434\u043d\u0430\u043a\u043e, \u0443 \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0432 \u0434\u0432\u0438\u0436\u043a\u0435 \u0435\u0441\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0440\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u2013 <code>UK2Node<\/code>. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0434\u0432\u0438\u0436\u043a\u043e\u0432\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>K2 \u043d\u043e\u0434\u044b \u0432 Unreal Engine<\/figcaption><\/div>\n<\/figure>\n<hr\/>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 K2 Node<\/h2>\n<p><strong>\u0412\u0410\u0416\u041d\u041e! \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043d\u043e\u0434\u0430\u043c\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0432 uncooked \u043c\u043e\u0434\u0443\u043b\u0435.<\/strong><\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e <code>UK2Node<\/code> \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0440\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0441\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0434\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438. <\/p>\n<p>\u0427\u0442\u043e \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442? \u0412\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u0430\u043c\u0438\u043c:<\/p>\n<ol>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0438\u043d.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0438\u043f \u043f\u0438\u043d\u0430 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0442\u0438\u043f \u043f\u0438\u043d\u0430 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0434\u0443 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u043c \u043c\u0435\u043d\u044e.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c\/\u0443\u0434\u0430\u043b\u044f\u0442\u044c\/\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043f\u0438\u043d\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435(\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e).<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435(\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e).<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0438\u043d\u0430(\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e).<\/p>\n<\/li>\n<\/ol>\n<p>\u0417\u0432\u0443\u0447\u0438\u0442 \u043a\u0430\u043a \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435(\u0442\u0430\u043a \u0438 \u0435\u0441\u0442\u044c), \u043d\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0432\u044b\u0431\u043e\u0440\u0430 \u043d\u0435\u0442. \u0417\u0430\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<hr\/>\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441<\/h2>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <code>Input Action Value<\/code> \u0438 \u0441\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442 <code>Action Value<\/code>, \u0430 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043d\u0430\u043c \u0442\u0438\u043f\u0430. \u0415\u0441\u043b\u0438 \u043d\u0430\u0448\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 <code>float<\/code>, \u0442\u043e \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c float, \u0435\u0441\u043b\u0438 <code>bool<\/code>, \u0442\u043e <code>bool<\/code>, \u0438 \u0442.\u0434.<\/p>\n<p>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c.<\/p>\n<p><code>.h<\/code> \u0444\u0430\u0439\u043b<\/p>\n<pre><code class=\"cpp\">#pragma once  #include \"CoreMinimal.h\" #include \"K2Node.h\" #include \"K2Node_GetInputValue.generated.h\"  UCLASS() class UK2Node_GetInputValue : public UK2Node { GENERATED_BODY()  public: \/\/~UEdGraphNode interface virtual void PostReconstructNode() override; virtual void PinDefaultValueChanged(UEdGraphPin* ChangedPin) override; virtual void ExpandNode(FKismetCompilerContext&amp; CompilerContext, UEdGraph* SourceGraph) override; \/\/~End of UEdGraphNode interface  \/\/~UK2Node interface virtual void AllocateDefaultPins() override; virtual void GetMenuActions(FBlueprintActionDatabaseRegistrar&amp; ActionRegistrar) const override; virtual bool IsNodePure() const override { return true; }  \/\/ \u0417\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043d\u0430 \u043d\u043e\u0434\u0443 virtual FText GetTooltipText() const override { return NSLOCTEXT(\"K2Node\", \"GetInputValue\", \"Extract input value with type from action.\"); }  \/\/ \u041f\u0438\u0448\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override { return NSLOCTEXT(\"K2Node\", \"GetInputValue\", \"Get Input Value\"); }  \/\/ \u041f\u0438\u0448\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0448\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f virtual FText GetMenuCategory() const override { return NSLOCTEXT(\"K2Node\", \"InputCategory\", \"Enhanced Input\"); } \/\/~End of UK2Node interface  private: void RefreshOutputPinType();  \/\/ \u041f\u0440\u043e\u0441\u0442\u043e \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 UEdGraphPin* GetActionValuePin() const { return FindPinChecked(TEXT(\"ActionValue\")); } UEdGraphPin* GetActionPin() const { return FindPinChecked(TEXT(\"Action\")); } UEdGraphPin* GetOutputPin() const { return FindPinChecked(TEXT(\"Value\")); } };<\/code><\/pre>\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u0438\u043d\u044b<\/h2>\n<p><code>AllocateDefaultPins<\/code><\/p>\n<p>\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u0430\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0438\u043d\u043e\u0432. \u0412 \u043d\u0435\u0439 \u043c\u044b \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u0422\u0443\u0442 \u043c\u044b \u0441\u0440\u0430\u0437\u0443 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u0445 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043d\u043e\u0434\u044b \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0432 blueprint graph.<\/p>\n<pre><code class=\"cpp\">void UK2Node_GetInputValue::AllocateDefaultPins() { \/** Creates input pins for ActionValue and Action, and an output pin for Value. *\/  \/\/ Action value pin UEdGraphPin* ActionValuePin = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Struct, FInputActionValue::StaticStruct(),                                         TEXT(\"ActionValue\")); ActionValuePin-&gt;PinToolTip = TEXT(\"Value received from the input system for the specified action.\");  \/\/ Action object pin UEdGraphPin* ActionPin = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Object, UInputAction::StaticClass(),                                    TEXT(\"Action\")); ActionPin-&gt;PinToolTip = TEXT( \"Input action to extract the expected value type from (used to determine output type).\");  \/\/ Output action value type pin UEdGraphPin* ValuePin = CreatePin(EGPD_Output, UEdGraphSchema_K2::PC_Wildcard, TEXT(\"Value\")); ValuePin-&gt;PinToolTip = TEXT( \"The extracted value of the input action, matching the expected type (bool, float, or Vector2D).\");  Super::AllocateDefaultPins(); }<\/code><\/pre>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0442\u0443\u0442 \u0435\u0441\u0442\u044c? \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 3 \u043f\u0438\u043d\u0430:<\/p>\n<ol>\n<li>\n<p>\u0412\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0438\u043d \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b Input Action Value.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0438\u043d \u0441\u0430\u043c\u043e\u0433\u043e Input Action.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0438\u043d \u0442\u0438\u043f\u0430 wildcard, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0435\u043d\u044f\u0442\u044c.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a\u0436\u0435, \u0441\u0440\u0430\u0437\u0443 \u0434\u0430\u0435\u043c \u0438\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0441\u0432\u0435\u0442\u0438\u0442\u0441\u044f \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043d\u0430 \u043d\u0438\u0445 \u043a\u0443\u0440\u0441\u043e\u0440\u043e\u043c.<\/p>\n<h2>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0442\u0438\u043f \u043f\u0438\u043d\u043e\u0432<\/h2>\n<p><code>PostReconstructNode<\/code> \u0438 <code>PinDefaultValueChanged<\/code><\/p>\n<p>\u042d\u0442\u0438 2 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043f\u0443\u043d\u043a\u0442\u0430 \u043f\u0440\u043e \u0440\u0443\u0447\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043f\u0438\u043d\u043e\u0432. \u041e\u043d\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0440\u0435\u043a\u043e\u043d\u0441\u0442\u0440\u0430\u043a\u0442\u0435 \u0438 \u0440\u0443\u0447\u043d\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043f\u0438\u043d\u043e\u0432 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435. \u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 <code>private<\/code> \u0441\u0435\u043a\u0446\u0438\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>RefreshOutputPinType<\/code>. \u0422.\u043a. \u0435\u0451 \u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445.<\/p>\n<pre><code class=\"cpp\">void UK2Node_GetInputValue::PostReconstructNode() { Super::PostReconstructNode();  RefreshOutputPinType(); }  void UK2Node_GetInputValue::PinDefaultValueChanged(UEdGraphPin* ChangedPin) { if (ChangedPin == GetActionPin()) { RefreshOutputPinType(); } }  void UK2Node_GetInputValue::RefreshOutputPinType() { \/** Updates the output pin type based on the selected Action's ValueType. *\/ UEdGraphPin* OutputPin = GetOutputPin(); if (!OutputPin) return;  OutputPin-&gt;Modify();  \/\/ Resets pin type before updating OutputPin-&gt;PinType = FEdGraphPinType();  const UEdGraphPin* ActionPin = GetActionPin(); if (!ActionPin || !ActionPin-&gt;DefaultObject) { OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Wildcard; return; }  const UInputAction* InputAction = Cast&lt;UInputAction&gt;(ActionPin-&gt;DefaultObject); if (!InputAction) return;  switch (InputAction-&gt;ValueType) { case EInputActionValueType::Boolean: OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Boolean; break; case EInputActionValueType::Axis1D: OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Real; OutputPin-&gt;PinType.PinSubCategory = TEXT(\"double\"); break; case EInputActionValueType::Axis2D: OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Struct; OutputPin-&gt;PinType.PinSubCategoryObject = TBaseStructure&lt;FVector2D&gt;::Get(); break; case EInputActionValueType::Axis3D: OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Struct; OutputPin-&gt;PinType.PinSubCategoryObject = TBaseStructure&lt;FVector&gt;::Get(); break; default: OutputPin-&gt;PinType.PinCategory = UEdGraphSchema_K2::PC_Wildcard; break; }  \/\/ Notifies the system about pin type changes GetSchema()-&gt;ForceVisualizationCacheClear(); GetGraph()-&gt;NotifyGraphChanged(); }<\/code><\/pre>\n<p>\u041a \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0432\u0443\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c \u043e\u0441\u043e\u0431\u043e \u0443\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0447\u0435\u0433\u043e. \u0420\u0430\u0437\u0432\u0435 \u0447\u0442\u043e \u0432 <code>PinDefaultValueChanged<\/code> \u043c\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0448 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0438\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>Input Action<\/code>, \u0442.\u043a. \u0441 \u043d\u0435\u0433\u043e \u043c\u044b \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0430\u0448 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0442\u0438\u043f.<\/p>\n<p><code>RefreshOutputPinType<\/code><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0438 \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0433\u043e(\u0432\u0430\u0436\u043d\u043e) \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"cpp\">OutputPin-&gt;Modify(); OutputPin-&gt;PinType = FEdGraphPinType();<\/code><\/pre>\n<p>\u0413\u043e\u0432\u043e\u0440\u0438\u043c \u0434\u0432\u0438\u0436\u043a\u0443, \u0447\u0442\u043e \u043c\u044b \u043c\u0435\u043d\u044f\u0435\u043c \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0438\u043d(\u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b undo\/redo), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0442\u0438\u043f \u043f\u0435\u0440\u0435\u0434 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430, <code>Input Action<\/code>, \u0442\u0438\u043f \u0435\u0433\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u043d\u0430 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0442\u0438\u043f \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0438\u043d\u0430. \u0422.\u043a. \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0439 switch, \u0442\u043e \u0441\u0434\u0435\u043b\u0430\u044e \u0430\u043a\u0446\u0435\u043d\u0442 \u043b\u0438\u0448\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0442\u0440\u0435\u0445 \u043f\u043e\u043b\u044f\u0445.<\/p>\n<pre><code class=\"cpp\">OutputPin-&gt;PinType.PinCategory OutputPin-&gt;PinType.PinSubCategoryObject OutputPin-&gt;PinType.PinSubCategory<\/code><\/pre>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0438 \u0437\u0430\u0434\u0430\u0435\u043c \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d \u0432 blueprint graph.<\/p>\n<pre><code class=\"cpp\">GetSchema()-&gt;ForceVisualizationCacheClear(); GetGraph()-&gt;NotifyGraphChanged();<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u043c\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c &#171;\u0440\u0435\u043d\u0434\u0435\u0440&#187;, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448\u0430 \u043d\u043e\u0434\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u043c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e blueprint \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0438 \u043d\u0430\u0434\u043e \u0431\u044b \u0435\u0433\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<h2>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043d\u043e\u0434\u0443 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u043c \u043c\u0435\u043d\u044e<\/h2>\n<pre><code class=\"cpp\">virtual FText GetMenuCategory() const override { return NSLOCTEXT(\"K2Node\", \"InputCategory\", \"Enhanced Input\"); }<\/code><\/pre>\n<pre><code class=\"cpp\">void UK2Node_GetInputValue::GetMenuActions(FBlueprintActionDatabaseRegistrar&amp; ActionRegistrar) const { \/** Registers this node in the blueprint action database. *\/ if (!ActionRegistrar.IsOpenForRegistration(GetClass())) return;  UBlueprintNodeSpawner* NodeSpawner = UBlueprintNodeSpawner::Create(GetClass()); check(NodeSpawner != nullptr);  NodeSpawner-&gt;NodeClass = GetClass();  ActionRegistrar.AddBlueprintAction(GetClass(), NodeSpawner); }<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448\u0443 \u043d\u043e\u0434\u0443 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u043c \u043c\u0435\u043d\u044e \u0431\u043b\u0443\u043f\u0440\u0438\u043d\u0442\u0430.<\/p>\n<figure class=\"\">\n<div><figcaption>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438<\/figcaption><\/div>\n<\/figure>\n<h2>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f<\/h2>\n<pre><code class=\"cpp\">void UK2Node_GetInputValue::ExpandNode(FKismetCompilerContext&amp; CompilerContext, UEdGraph* SourceGraph) { \/** Expands the node into a function call from UEnhancedInputLibrary. *\/ Super::ExpandNode(CompilerContext, SourceGraph);  UEdGraphPin* ActionValuePin = GetActionValuePin(); const UEdGraphPin* ActionPin = GetActionPin(); UEdGraphPin* OutputPin = GetOutputPin();  if (!ActionValuePin || !OutputPin) { CompilerContext.MessageLog.Error( *LOCTEXT(\"MissingPins\", \"GetInputValue: Missing pins\").ToString(), this); return; }  if (!ActionPin || !ActionPin-&gt;DefaultObject) { CompilerContext.MessageLog.Error( *LOCTEXT(\"InvalidInputAction\", \"GetInputValue: Action pin is invalid or not set\").ToString(), this); return; }  const UInputAction* InputAction = Cast&lt;UInputAction&gt;(ActionPin-&gt;DefaultObject); if (!InputAction) { CompilerContext.MessageLog.Error( *LOCTEXT(\"InvalidInputAction\", \"GetInputValue: Action pin does not contain a valid InputAction\").ToString(), this); return; }  \/\/ Determines which function to call based on ValueType FName FunctionName; FName ActionValueName = TEXT(\"InValue\"); switch (InputAction-&gt;ValueType) { case EInputActionValueType::Boolean: FunctionName = GET_FUNCTION_NAME_CHECKED(UEnhancedInputLibrary, Conv_InputActionValueToBool); break; case EInputActionValueType::Axis1D: FunctionName = GET_FUNCTION_NAME_CHECKED(UEnhancedInputLibrary, Conv_InputActionValueToAxis1D); break; case EInputActionValueType::Axis2D: FunctionName = GET_FUNCTION_NAME_CHECKED(UEnhancedInputLibrary,<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-455269","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/455269","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=455269"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/455269\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=455269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=455269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=455269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}