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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

C++ Instanced members in inherited Components

Hello everyone. I have a question about "Instanced" mambers of classes. I've created my own class, let's say, ActionComponent, then I wanted to add a member ActionBase class pointer( class ActionBase * m_actions ) and mark it as "Instanced" in UPROPERTY, so I wanted to put real objects to that field in the editor. Then I added my ActionComponent as a member to other class. The problem is that in this case I can't set a value for m_actions in the editor. I thought that maybe it's due to inheritance, but then I look at CharacterClass(which is generated by default) which have an UCameraComponent which contains AssetUserData memeber and it's looks exactly like my m_actions, but it worked well inside editor. Ok, I thought maybe assets is a some kind of special objets. BUT! The thing is that since my ActionComponent is inherited from U ActorComponent it contains AssetUserData field too, but I can't edit him inside editor. Can anybody explain me how it works?

Product Version: UE 4.21
Tags:
more ▼

asked Mar 25 '19 at 07:18 PM in C++ Programming

avatar image

Exelim
3 1 2 4

avatar image Exelim Mar 26 '19 at 09:16 AM

Ok, I managed to deal with it. Looks like a bug, the thing is if I create component like this: m_actionComponent = CreateDefaultSubobject(TEXT("ActionComponent")); Everything would work perfectly. But If i'll add a space in component name: m_actionComponent = CreateDefaultSubobject(TEXT("Action Component")); It won't work anymore.

(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