Make Unreal Engine Game User Settings BETTER with SIMPLE C++ | Beginner Tutorial
Вставка
- Опубліковано 7 лют 2025
- Code/Written tutorial: continuebreak....
Patreon: / continuebreak
BuyMeACoffe: www.buymeacoff...
UE documentation about visual studio: docs.unrealeng...
Why use TEXT: docs.unrealeng...
C++ strings: www.w3schools....
==========================================================
Join my Discord: / discord
Follow on
Twitter: / continuebreak
Instagram: / continuebreak
TikTok: / continuebreak
Facebook: / continuebreak
==========================================================
Have you ever made an Unreal Engine settings menu and been like, "I love this game user settings node"? And after some time, you were like, How do I save a custom value in settings? And after a Google search, you were like, "Wait, I need to make a save game class just to save a single value?". And then you learn that it will not save those settings in the config file like other settings, but instead, it will be saved as a save game file, that you can't even edit by opening it in a text editor. Wouldn't it be cool if you could simply make a better game user settings node that would save your setting values together with other settings? Well, we can do that, by simply struggling a little bit with C++.
Intro 0:00
Programming IDE 0:47
Class creation 1:06
Adding a custom setting variable 2:12
Setting default values in the constructor 6:37
Exposing new settings to blueprints 7:50
Lazy way to add a custom setting variable 9:00
Why not do it the lazy way? 9:34
Compiling code 10:35
Changing the default class for game settings 11:15
Checking results 11:52
#ue5 #cpp #tutorial #unrealengine5 #ue4 #unreal #unrealengine #gamedev #indiedev #gamedevelopment #guide #settings #save #loading #visualstudio #beginner #programming
I don't get how this video isn't more popular, this is the proper way to make it and i think that Epic Games should do documentation to explain this kind of things.
If anyone else's settings are still returning none in blueprints despite seemingly entering the correct line in DefaultEngine, you can choose the class manually by going into Project Settings -> Engine -> General Settings and changing Game User Settings Class manually.
Great tutorial!
Thank you, bro!!! I had this error
Thanks for the tutorial, it was really handy!
Switching from BP-only dev, I'm constantly being amazed how much C++ has to offer
Learn it, it is really powerful!
Thanks a lot man. That's exactly what I was trying to do and this helped me.
great video, and straight to the point!
also, I loved the constructor values you set for the properties lmao
bro described in the beggining exactly what was happening to me
Thanks for the tutorial, it is exactly what I was searching how to do.
Thanks! That helped a lot.
I have added the functions to the LyraSettingsLocal class of the Lyra sample project and it works like a charm! :)
I was a bit confused why they don't have ObjectInitializer behind the constructor, but it seems you don't need this anymore in newer versions of Unreal Engine. Visual Studio did also throw an error for me there.
haven't seen good code on the youtube for long time but this video is god dn made good
This was very helpful and nicely put together, thank you!
Thank you, very helpful.
3:11 most common blueprint types
I'm pretty sure you don't need getter/setter to do this, just make the UPROPERTY editanywhere/blueprint read write, pretty sure this works fine with config variables
I showed that at 9:00
@@ContinueBreak Ah good. My bad, I didn't watch the whole thing. Your video came up in a search query but it wasn't related to what Im trying to solve. You get a thumbs up from me and a subcription
This was a nice tutorial, thanks.
Thanks for the great video you got my sub
legend
Спасибо! Отличный урок!
I just looked around, and it appears `FObjectInitializer` is a proxy your CDO can use when creating its subobjects, instead of calling `NewObject()` manually. Then any child classes of your object can configure the `FObjectInitializer` before sending it into your constructor, to change what subobjects are created.
However, how to call getbettergameusersettings in c++ class?
It's a static method so you can simply to this: UMyGameUserSettings::GetBetterGameUserSettings(); Adjust it to use your class name and method name. And add #include to your settings class at the top of your .cpp file.
mans revived after 3 months, wheeee
just a note for any UE4 devs. You can leave GENERATED_BODY() as is. It will compile.
The image you posted of the blueprint variable names and then the c++ syntax is very helpful, where can I find more 'cheatsheets' like that?
I did everything as it is said in video but I am getting this error
Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetBetterConfigSettings_ReturnValue". Node: Branch Graph: Control Speed Function: Control Speed Blueprint: BP_Car
Did you add your settings class to DefaultEngine.ini config file? Have you tried to remove that node from blueprints, close the UE project then recompile it from Visual Studio and then open project again?
right now i cant get it to work. I have a new float i added and i am putting it in a print string and it just gives me this
Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetBetterGameUserSettings_ReturnValue". Node: Print String Graph: EventGraph Function: Execute Ubergraph Fps Character 1 Blueprint: Fps_Character1
Do you know what i might have done wrong?
I have tried the right way and the lazy way and neither work.
Did you change the default settings class in the DefaultEngine.ini config file? Did you remove the U prefix from your class name in there? Did you write your project name correctly in there?
@@ContinueBreak Hi. sorry i figured it out 30 min after i posted that and forgot to take it down. i named it the wrong thing. i named after an old project by mistake. But thanks anyway! this was a great tutorial!
Hi, does this work to save Enhanced input key mappings?
I don't know. I have never tried to use it with enhanced input.
@@ContinueBreak I have tried, but i actually don't know how to define the "Enhanced input key mapping" variable(that also should be an array). Any ideas?
#include "--.generated.h" has an error cannot open source file "-.generated.h"
Can't tell much from your error. Did you close the Unreal Engine when you tried to build from Visual Studio?
@@ContinueBreak yes
I'm a bit confused. So say I got all of this done correctly. Does this mean like for enabling vsync I can theoretically do it from the new GetBetterGameUserSettings? Because if I can, I seem to not be able to get it to save the new settings atm.
Edit: Nvm. Found the issue. Thanks for the video. Solved the issue I've been dealing with for a few days now. Subbed.
the narrator sounds like AI, as does the script
The narrator is Text To Speech. Actually, I should have used AI when I couldn't formulate my thoughts on how to explain something. It might have actually helped me write this script faster.