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"

OnClicked Parameters


So i was wondering what parameters my OnClick function would need, not much else. I have searched through the docs but i have found nothing, everything seems to be focused on blueprint :/

this is what im using: col = PCIP.CreateDefaultSubobject(this, TEXT("light")); col->OnClicked.AddDynamic(this, &AMyActor::OnClick);

Product Version: Not Selected
more ▼

asked Dec 04 '14 at 08:29 PM in C++ Programming

avatar image

65 7 9 13

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

2 answers: sort voted first


Try this code

 Void OnClick(UPrimitiveComponent* pComponent)
     // to do smth



more ▼

answered Dec 11 '14 at 01:45 PM

avatar image

1.8k 76 19 143

avatar image FortuneStudios Dec 13 '14 at 10:08 PM

Thank you :)

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

For newer people to the UE4 (I couldn't find any example online of this so I thought I'd post) When updating from 4.9.2 to 4.12.1 I had to change my onclicked functions to be

void OnClick(UPrimitiveComponent* pComponent, FKey inKey) { //do stuff }

more ▼

answered Jun 08 '16 at 05:13 PM

avatar image

11 2

avatar image Wookiee81 Jun 28 '16 at 02:41 PM

", FKey inKey" that little bit was killing my brain... Thank you so much! the jump from 4.11 to 4.12 was much more painful than it needed to be because of that tiny (useful) addition.

avatar image Nevermore Jul 20 '16 at 04:56 PM

Is the pComponent a component that got clicked?

avatar image LvWeding Jul 26 '17 at 07:04 AM

thanks a lot

(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