Wow! Thank you. I spent the last two days trying to find how to create a C++ Slate Widget and then ran across your tutorial. I'm a C++ programmer who has created many C++ source files that communicate over the network, so I'm very fluent on how to come in and out of blueprints. Slate is a bit of a different animal on how it communicates to widget blueprint classes. I have to say, you have the best tutorial out of the entire youtube group. This was the start I needed. I now know how the blueprints and slates communicate.
Thank you. There are very few tutorials that take a C++ first approach to UMG. I've been struggling to bring my C++ widget code and BP together and this video provided the missing piece. Thank you very much!
Are you thinking of doing more c++ tutorials? We need way more tutorials. Could you do one about dynamic vertical boxes next if you were going to do more? This one was great keep up the good work!
@@benui basically im making a system that pulls components from a given object (through linetraces or whatever) and then makes a simple widget with the name of the component. Then there is a verticle box, where you pass this widget to be added to so its basically like a giant list of the components on a verticle box and it works for anything I already sort of found the solution after digging a ton but there isnt anything on c++ for verticle boxes, let alone dynamic lists like that and it could help lots of people
@@benui perhaps a simple quiz, a calculator or even just menu - but done with C++. But I am happy to learn any tips and tricks using C++ from you. Such an excellent start to your channel.
Great tutorial! I hope you are planning to do the same *whitout* buttons (I mean, process widget user information in a game loop whitout button clicks, how to implement delegates and function calls in state changes in widget elements, committed states, etc).
AddUniqueDynamic is not available in my case. Could 4.24.3 version of Unreal be the cause? It says that: "FOnButtonClickedEvent" does not contain "AddUniqueDynamic"
I was looking on how to create widget in c++, unfortunately at the end you do it in blueprint (the "CreateWidget" function in the controller)...I can't believe there is no documentation, gpt4 doesn't know either. Stuck for days with something that literally takes 10 seconds in blueprint...
The line GenerateButton->OnClicked.AddDynamic(this, &URngWidget::OnGenerateButtonClicked) triggers an assert and the engine crashes. Do you have any clues, guys?
Ps: GenerateButton is NULL btw, but I created a BP widget based in the C++ class, an UButton with the same name as the class member and i created a RngWidget instance using the player controller, in the BP graph editor.
@@tadeuariasvillares784 did you mark the GenerateButton in the header with UPROPERTY(meta=(BindWidget)) ? If generatebutton is null maybe that's the cause?
Hey, not really a twitter user hence this way of connecting with you. Your Unreal UIs and c++ slate tutorial on your website seem to be only partially complete, is that some kind of a bug or it's not yet finished?
Also your text tutorials helped me a bunch, thank you :) edit: Clear, straight to the point and every little quirk explained as well, wish we had more of those
Was looking for the same. So far I discovered if you press alt + shift + f10 when hovering a unknown class you get the include options Also you could right click on the unknown class and add it with the refactor menu. It's both not the same as in the video but works.
Hey, Thanks for the tutorial and I tried it myself. Only problem I came across was that I couldn't set the Text of a UTextBlock if I didn't include Components/TextBlock.h is that normal or am I doing something wrong?
I'm workin on a Paper 2D project, and I do manage to create a widget to display while attached to an actor. Thing is, it only works if I manually attach it to the actor blueprint. We want to attach it through c++ as a widget component, but it's just invisible. We do get it to show when we toggle visibility on and off but would love to know if you have any idea as to why it's not showing up in the first place :(
@Dark of the knight lol at least for my case, my widget just didnt override the beginplay and the ontick function or whatever its called. Also make sure you capitalize them right hah
Wow! Thank you. I spent the last two days trying to find how to create a C++ Slate Widget and then ran across your tutorial. I'm a C++ programmer who has created many C++ source files that communicate over the network, so I'm very fluent on how to come in and out of blueprints. Slate is a bit of a different animal on how it communicates to widget blueprint classes. I have to say, you have the best tutorial out of the entire youtube group. This was the start I needed. I now know how the blueprints and slates communicate.
Thank you. There are very few tutorials that take a C++ first approach to UMG. I've been struggling to bring my C++ widget code and BP together and this video provided the missing piece. Thank you very much!
Are you thinking of doing more c++ tutorials? We need way more tutorials. Could you do one about dynamic vertical boxes next if you were going to do more? This one was great keep up the good work!
Thanks for commenting! I definitely want to make more tutorials :) Could you explain a bit by what you mean by dynamic vertical boxes?
@@benui basically im making a system that pulls components from a given object (through linetraces or whatever) and then makes a simple widget with the name of the component. Then there is a verticle box, where you pass this widget to be added to so its basically like a giant list of the components on a verticle box and it works for anything
I already sort of found the solution after digging a ton but there isnt anything on c++ for verticle boxes, let alone dynamic lists like that and it could help lots of people
Hard to find great tutes like this on UI. Hope you do more!
Thanks! Are there any topics in particular you would like to see covered?
@@benui perhaps a simple quiz, a calculator or even just menu - but done with C++. But I am happy to learn any tips and tricks using C++ from you. Such an excellent start to your channel.
@@benui Can you make a tutorial about Slate prpgramming?
Bump! Exxactly. Yes please!
@@benui Extending the toolbars and widgets in the UI. for e.g extending the measure tool too readout meters instead of cm's.
Cheers,
b
Great tutorial! I hope you are planning to do the same *whitout* buttons (I mean, process widget user information in a game loop whitout button clicks, how to implement delegates and function calls in state changes in widget elements, committed states, etc).
yeah that's probably the best way to make C++ and UI work together. never tried slate, probably never will, I fucking love UMG
More C++ tutorials, please!
If you get linker errors, you'll need to add the UMG module as a public dependency in your build file
excellent, I tried and works perfect, thanks
AddUniqueDynamic is not available in my case.
Could 4.24.3 version of Unreal be the cause?
It says that: "FOnButtonClickedEvent" does not contain "AddUniqueDynamic"
It might be? I've not used 4.24 for a long time.
I was looking on how to create widget in c++, unfortunately at the end you do it in blueprint (the "CreateWidget" function in the controller)...I can't believe there is no documentation, gpt4 doesn't know either. Stuck for days with something that literally takes 10 seconds in blueprint...
Awesome stuff!
thank you..
i did not see how you assign RandomNumberLabel variable, is it somehow internally assigned ?
Hello, can you send your visual studio configuration.My source code always reports errors
The line GenerateButton->OnClicked.AddDynamic(this, &URngWidget::OnGenerateButtonClicked) triggers an assert and the engine crashes. Do you have any clues, guys?
Ps: GenerateButton is NULL btw, but I created a BP widget based in the C++ class, an UButton with the same name as the class member and i created a RngWidget instance using the player controller, in the BP graph editor.
@@tadeuariasvillares784 did you mark the GenerateButton in the header with UPROPERTY(meta=(BindWidget)) ?
If generatebutton is null maybe that's the cause?
I have the same problem, the engine always crash with the UPROPERTY(meta=(BindWidget)) , did you solve this problem?
@@jonnathanaponte5892 Hello! Try change the class (when you create the widget) in the Blueprint Level
can't you do the last part the noodle section in c++? I dunt want to use noodles
You can add this code to your APlayerController subclass. This was just to test, so I think using BP logic was fine for the tutorial.
Can I use C++ in my blueprint game project as I didn't select the C++ project in the beginning?
That's a good question, I don't think so but I'm not sure.
you can ! just make a c++ class write the code and reparent the UI widget
Thanks Bro
Hey, not really a twitter user hence this way of connecting with you.
Your Unreal UIs and c++ slate tutorial on your website seem to be only partially complete, is that some kind of a bug or it's not yet finished?
Also your text tutorials helped me a bunch, thank you :)
edit: Clear, straight to the point and every little quirk explained as well, wish we had more of those
Yeah sorry I need to make some time to improve the Slate tutorials :S
@@benui No worries, it was still a great starting point, thank you :)
Is there anyone who knows how to set up Visual Studio and get a similar look as in the video?
Ты крутой
8:25 You wrapped a function to call another function, makes actually no sense at all.
Hi, I am very curious as to what hotkeys you pressed to add #include parts of your code to the top of the file at 8:32 ?
Was looking for the same. So far I discovered if you press alt + shift + f10 when hovering a unknown class you get the include options
Also you could right click on the unknown class and add it with the refactor menu.
It's both not the same as in the video but works.
You are literally the only person who explains how to do this logic tying it in to blueprint..... Thank you for the video.
Hey, Thanks for the tutorial and I tried it myself. Only problem I came across was that I couldn't set the Text of a UTextBlock if I didn't include Components/TextBlock.h is that normal or am I doing something wrong?
No that's normal, I might have had another file that included Components/TextBlock.h elsewhere that meant I didn't have to include it.
Ben you handsome lil man, i love you! thanks alot for the tut an your online documentation you do yourself, you're awesome
Nice! this is exactly what I've been looking for. Please make more... Instant subscribe ;D
Class::NativeConstruct inherited member is not allowed what should I do?
It's hard to tell without seeing the rest of your code. You might get more luck asking on the Unreal Slackers Discord: unrealslackers.org/
unreal is not showing the class i just created :(
I'm workin on a Paper 2D project, and I do manage to create a widget to display while attached to an actor. Thing is, it only works if I manually attach it to the actor blueprint. We want to attach it through c++ as a widget component, but it's just invisible. We do get it to show when we toggle visibility on and off but would love to know if you have any idea as to why it's not showing up in the first place :(
@Dark of the knight lol at least for my case, my widget just didnt override the beginplay and the ontick function or whatever its called. Also make sure you capitalize them right hah