Struct只能传引用,不能传指针'
Pointers to classes work, pointers to structs won't.
一般要将
UFUNCTION()
void ServerUpdatePotential(FYagPotentialStruct* InStruct);
改为
UFUNCTION() void ServerUpdatePotential(struct FYagPotentialStruct& InStruct);
原因是:
UE4中蓝图的展示,只适用于继承于UObject的指针
if your struct is a USTRUCT you should be able to pass it by reference rather than using a pointer.
参考:
https://answers.unrealengine.com/questions/132416/how-do-i-expose-a-pointer-to-a-struct.html
https://forums.unrealengine.com/showthread.php?2364-C-and-Blueprint-Interaction-Problems-Pointers