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"

get Character under actor component


I have a Character class with some ActorComponent attach to it, in my component I wana get the player character, or make an create widget.

any idea

Product Version: Not Selected
more ▼

asked Jan 02 '15 at 12:46 PM in C++ Programming

avatar image

179 34 35 43

avatar image Jan 02 '15 at 01:44 PM


to get the owner of a component as a character you only need to cast it like this :

 ACharacter* ownerCharacter = Cast<ACharacter>(GetOwner());
avatar image Talus Jan 02 '15 at 04:16 PM

to get the player Character it's work fine, but my explanation isn't not great

my component will be able to manage the UI of the game, UI made using UMG, so I need to be able to use CreateWidget function, can I delegate this management outside my character ? and how ?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I'm sorry i misunderstood your question :p

It seems that using UMG in C++ is not recommended by Epic.

I don't know if you can easily create UMG widgets from C++, but you can easily access your character's UPROPERTY and UFUNCTION from inside the UMG callbacks

more ▼

answered Jan 02 '15 at 04:49 PM

avatar image

1.5k 47 32 103

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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