x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

被DefaultToInstanced修饰的类作为另外一个类的成员变量时,在蓝图中编译会被清空

代码如下:

UTBuff.h:

UCLASS(Blueprintable,BlueprintType,DefaultToInstanced,hidecategories=Object,editinlinenew,Category="Buff")

class UNREALTOURNAMENT_API UUTBuff : public UObject

{

......

};

UTBuffManager.h:

USTRUCT(BlueprintType)

struct FBuffItem {

 GENERATED_USTRUCT_BODY()

 UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="Buff")
 FName    Name;
 UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="Buff")
 UUTBuff*    Buff;

};

UCLASS(Blueprintable,BlueprintType,hidecategories=(Actor,Object,Replication,Input,Tags,Rendering))

class UNREALTOURNAMENT_API AUTBuffManager : public AActor { GENERATED_BODY()

public:

 UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="BuffManager")
 TArray<FBuffItem> BuffList;

     ........

};

在编辑器中为UTBuffManager的蓝图配置BuffList之后,一旦点击编译,BuffList中配的数据就会被清空。

Product Version: UE 4.6
Tags:
more ▼

asked Dec 25 '15 at 09:09 AM in C++ Programming

avatar image

CrazyProgrammer
1 3 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question