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"

How do I hide a property of a parent class?

Hi there! Thanks for reading.

Let's say I have an Actor Component which is derived from UStaticMeshComponent, and in the editor has a check "Simulate Physics". I would like to hide this option for every user that's gonna use this derived component. I know about UPROPERTY() and how to hide categories using Specifiers, but not how to hide a certain property that exists in a parent class.

Help is appreciated!

Product Version: UE 4.11
Tags:
more ▼

asked May 11 '16 at 03:53 PM in C++ Programming

avatar image

Trent LeBreaux
103 3 5 11

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

If it's specifically related to SimulatePhysics, you can use SetSimulatePhysics(false); in the constructor. In general though, you can't shadow uproperty variables of the parent class as Unreal doesn't allow it (Maybe because of reflection?)

more ▼

answered May 11 '16 at 10:05 PM

avatar image

Regalith
156 12 9 17

avatar image Trent LeBreaux May 12 '16 at 10:52 AM

Thanks for answering Regalith. That's a pity.I might just stick with designing my own Details panel and pushing the values in the contstructor upwards. I'm still curious though, because the Character class inherits components that are editable in the editor. I'll just wait a little longer before marking this thread as solved :)

(comments are locked)
10|2000 characters needed characters left

You can do it if you create your own DetailsPanel with CustomizeDetails. This hides the ComponentTags property from the UActorComponent:

 TSharedRef<IPropertyHandle> tagsProperty = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(UActorComponent, ComponentTags), UActorComponent::StaticClass());
 DetailBuilder.HideProperty(tagsProperty);
more ▼

answered Nov 02 '17 at 04:11 PM

avatar image

cbraig
1 3 3

(comments are locked)
10|2000 characters needed characters left
Your answer
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