как мне преобразовать мою структру в строку с помощью exprottextitem? void…
- User
как мне преобразовать мою структру в строку с помощью exprottextitem? void UCustomK2Node::ExpandNode(FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph) { Super::ExpandNode(CompilerContext, SourceGraph);
codeUEdGraphPin* ExecPin = FindPin(TEXT("lol")); UEdGraphPin* ThenPin = FindPin(TEXT("nelol")); UEdGraphPin* OutputPin = FindPinChecked(FeaturePinName); UK2Node_CallFunction* CallFunctionNode = CompilerContext.SpawnIntermediateNode<UK2Node_CallFunction>(this, SourceGraph); CallFunctionNode->FunctionReference.SetExternalMember(GET_FUNCTION_NAME_CHECKED(UCustomK2Node, GetScen), UCustomK2Node::StaticClass()); CallFunctionNode->AllocateDefaultPins(); UEdGraphPin* StrPin = CallFunctionNode->FindPin(TEXT("str")); UEdGraphPin* ClsPin = CallFunctionNode->FindPin(TEXT("cls")); if ( !Obj.Path.IsEmpty() ) { FPathToScenarioObject Test; Test.Path.Append(Obj.Path); } - Assistant
Чтобы преобразовать вашу структуру в строку с помощью
ExportTextItem, вы можете использовать комбинациюFStructOnScopeиFTextStringHelper::WriteToString. Вот как это можно сделать:cpp