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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to send parameters with UButton OnClicked?

Hello guys,

So at the moment I made 2 levels and I want to use the same function for both the buttons. In the function I need to know which button is clicked, so I can open the right level. I can't find anything on the internet. Can someone else help me with this?

Code at the moment: alt text

alt text

Product Version: UE 4.17
Tags:
vragenue41.png (27.5 kB)
vragenue42.png (6.7 kB)
more ▼

asked Dec 31 '17 at 03:23 PM in C++ Programming

avatar image

SupremeWarlock10
3 5 8

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

2 answers: sort voted first

Hey there, use this.

more ▼

answered Dec 31 '17 at 03:51 PM

avatar image

xlar8or
6k 161 129 304

avatar image SupremeWarlock10 Dec 31 '17 at 03:55 PM

Thanks for your reaction. I already tried that and I had the same name with both buttons.

avatar image SupremeWarlock10 Dec 31 '17 at 03:58 PM

Do I need to make a slate widget for this?

avatar image xlar8or Jan 01 '18 at 09:57 PM

Instead of sending the name on the delegate, send the button itself, that way you can compare the instance itself.

avatar image SupremeWarlock10 Jan 03 '18 at 06:33 PM

Hey, sorry for my late reaction. I already sorted it out with the link that you wrote. I didn't knew there was a class to create a customized button.

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

Maybe try this

 FOnClicked::CreateStatic(&YOURFUNCTION, Parameter1, Parameter2)

or

 FOnClicked::CreateSP(this, &YOURFUNCTION, Parameter1, Parameter2)
more ▼

answered May 27 '19 at 09:52 AM

avatar image

SlothSimon
21 3

(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