I’m having an amazing amount of help from forum users every time I’m getting lost, so I dare to ask for help once more
I’ve finished a custom asset type for editor and was pretty happy with it until a migrating from test project to a real one required. Turned out copy and pasting nodes from one project to another requires some work.
As for copying nodes:
My custom node have a
that holds all necessary data and can be used in game. Now when I copy the node from one project’s editor to another project’s editor, it doesn’t copy any of RuntimeNodeInstance’s data nor it allocates memory for it.
There is nothing tricky to create an object for a node, but how can I transfer required data?
I’ve inspected import text from BehaviourTreeEditor and there are few lines my import text node doesn’t have.
Begin Object Class=DialogueExpressionNode Name="DialogueExpressionNode_9" NodeRuntimeInstance=DialogueExpressionNodeRuntime'DialogueExpressionNodeRuntime_3' NodeRuntimeClass=Class'/Script/DialogueTool.DialogueExpressionNodeRuntime' ...
Begin Object Class=BehaviorTreeGraphNode_SimpleParallel Name="BehaviorTreeGraphNode_SimpleParallel_0" Begin Object Class=BTComposite_SimpleParallel Name="BTComposite_SimpleParallel_1" End Object Begin Object Name="BTComposite_SimpleParallel_1" TreeAsset=BehaviorTree'/Game/NewBehaviorTree.NewBehaviorTree' End Object ClassData=(ClassName="BTComposite_SimpleParallel") NodeInstance=BTComposite_SimpleParallel'BTComposite_SimpleParallel_1' ...
So BehaviourTreeEditor somehow transfers data about runtime object, about it’s location and class. I guess this data is used to spawn a runtime object upon copy, but how can that be achieved?
Also I did want to copy custom .uasset from one project to another and it’s getting copied and recognized correctly, but I can’t open it.
I just click it and nothing happens at all. FAssetTypeActions_Base::OpenAssetEditor() should get called, but just nothing happens.
On right click editor says “Failed to load Asset”. I guess it’s linked with the first trouble.