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"

Custom component with a hierarchy

I'd like to, as the title said, code a custom component which contain one or more child. It would create a hierarchy like when we drag'n drop components on one another in the Components tab of the Blueprint window. Right now, I've tried this:

 UCLASS(meta = (BlueprintSpawnableComponent))
 class UBadAssComponent : public USceneComponent
     UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"))
     UStaticMeshComponent mesh;

     UBadAssComponent(const FObjectInitializer& ObjectInitializer);


Right now, UE will mix all of the attributes from the two component when I add it in the editor. That behavior is really not helpful to make complex component. For exemple, one could think of a component that contain two or three different static mesh. If needed, I could do a mock to demonstrate the idea.

Here some pictures to explain my point. Say I made a custom AActor in C++. When I create a blueprint from it, I can see each of its children on its own in the component tab.

alt text

You can then edit the property as you'd like by selecting every component in the actor. You can also add new components.

alt text

So now we have cool little hierarchy between all the different component. In UE term, I think we would say they are attached and so their transform vectors are relative to their parent (I think). Now I'd like to create a custom ActorComponent which, when added to a blueprint, would show as a parent-child hierarchy. The result would be like in the green box, but the hierarchy would have been made by c++ code instead of by drag'n droping in blueprint.

Please don't mind the bad example used in the picture, I made it on the fly to demonstrate my idea. I also open to another way to achieve a similar result.

Product Version: Not Selected
more ▼

asked Jan 23 '15 at 06:35 AM in C++ Programming

avatar image

6 1 2 2

avatar image ttvd Jan 23 '15 at 05:54 PM

Can you elaborate on 'mix all of the attributes from the two components' ? You can create custom details presentation (for details panel) which will separate them..

avatar image refnil Jan 23 '15 at 06:29 PM

I've edited my original post. And thank you for you're time. It is greatly appreciated.

avatar image Cloudy McStrife Jun 02 '16 at 09:11 AM

Hey Refnil Did you find a solution for your Problem?

avatar image jimmyt1988 Jul 11 '17 at 10:21 PM

I have exactly the same problem! Looks like a bug in UE!

avatar image cart Sep 13 '17 at 11:32 AM

Same question. Anyone have fixed the problem?

(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