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"

How to validate a component that is added to a blueprint in the editor?


I have been working on attaching Unreal as a view/controller to our already implemented game.

There is the concept of Entity in our game that roughly corresponds to an Unreal Actor. The Entity can be just anything and it can also act as a container for children Entities.

Our Entity holds its physics collider separately (if there is any) and it also may or may not have a skeleton attached. So the Entity in our game can correspond to the following actor components:

  1. A Scene Component with a transform but no physics.

  2. A Primitive Component with physics and transform but no mesh

  3. A Static Mesh Component with physics, transform and mesh

  4. A Skeletal Mesh Component with physics, transform, rigged mesh and skeleton.

As far as I know there is no way of creating an Actor hierarchy within an Actor statically within the Editor. In Unity a prefab might include a hierarchy of GameObjects (GameObject = Actor in Unity sense) but in Unreal prefabs (corresponding to blueprints) might only include a hierarchy of components not actors. Of course actors can be added via pointers at run time but not at Editor time. The problem is the Entity in our game has the potential to directly map between both an actor and the above mentioned 4 components.

So what I need is some kind of a component that can be configured to have the above mentioned 4 components' properties. And it should become an Actor when it is detached from its original actor's component hierarchy.

I've thought about it and the best solution was to create an interface which is implemented by a set of custom components (one for each of the above 4) which inherit both the base versions of the above mentioned components and the interface itself. So every component within my actors' component hierarchy becomes a potential candidate of becoming an actor itself (when detached).

But I would like to have a way to validate that whenever the game programmer or an artist creates an Entity blueprint in the Unreal Editor the added components to this entity blueprint do implement my EntityInterface. I can do this check in C++. The editor should not let the addition of components that does not implement the EntityInterface.

I've found that there are several methods that can notify the CPP side when a property of a class changes. These are PreEditChange, PostEditChange etc. The best place to do this verification seems like PreEditChange method however I have no information about the value the property is changed to at this stage.

So how can I do such a verification?


Product Version: UE 4.15
more ▼

asked Apr 18 '17 at 10:57 AM in C++ Programming

avatar image

154 17 20 39

avatar image WeiLiang Apr 26 '17 at 09:22 AM

Same issue faced! Any help??

(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