![]() And I dont know how to call non-default constructor in other way. But I need it to be UObject, to be usable in blueprints. I think that there is something in UClass, that dont allow me to use constructor that way, since I can do this with objects, that are not UObject. Though, it's constructor is public and all properties are public. Though on compilation I get error, that I try to access private members of UItem class. Since items are fixed and will not change during game, I dont want to create specific object for each of them, and just have references to container entries. So I can at the begiining of game create this item container ItemsContainer = NewObject() Īnd then add it to some item collection of certain entity like this TArray CharacterItems = ĬharacterItems.Add(&ItemsContainer.SomeItem) UCLASS()Ĭlass xxxx_API UItemsContainer : public UObject UPROPERTY(BlueprintReadOnly, Category = "Parameters")Īnd I have another class, which I want to serve as container for pre defined items, so I can have references to it from other places of the game. ![]() inventory item.Īnd along with default constructor, I need parametrized constructor, to create items with certain set of parameters, for example, size) UCLASS() I have a class, describing some object with properties, e.g.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |