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

КОМЕНТАРІ • 44

  • @imyokoyoko
    @imyokoyoko Рік тому +6

    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.

  • @seanmenzies1986
    @seanmenzies1986 Рік тому +6

    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!

  • @spexso1362
    @spexso1362 11 місяців тому +1

    Thanks for the tutorial, it was really handy!

  • @damianm.8736
    @damianm.8736 Рік тому +2

    Switching from BP-only dev, I'm constantly being amazed how much C++ has to offer

    • @subject8332
      @subject8332 Рік тому +1

      Learn it, it is really powerful!

  • @VIDEAoriginal
    @VIDEAoriginal Рік тому

    Thanks a lot man. That's exactly what I was trying to do and this helped me.

  • @edusilveira777
    @edusilveira777 8 місяців тому

    great video, and straight to the point!
    also, I loved the constructor values you set for the properties lmao

  • @lucasbucheb
    @lucasbucheb 26 днів тому

    bro described in the beggining exactly what was happening to me

  • @learningcurveproductions6599

    Thanks for the tutorial, it is exactly what I was searching how to do.

  • @ashtorak
    @ashtorak Рік тому

    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.

  • @Neon30
    @Neon30 11 місяців тому

    haven't seen good code on the youtube for long time but this video is god dn made good

  • @glowbug-t8w
    @glowbug-t8w Рік тому

    This was very helpful and nicely put together, thank you!

  • @fidel_soto
    @fidel_soto 7 місяців тому

    Thank you, very helpful.

  • @PixelIndieDev
    @PixelIndieDev 8 місяців тому +1

    3:11 most common blueprint types

  • @frankoyer4310
    @frankoyer4310 29 днів тому

    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

    • @ContinueBreak
      @ContinueBreak  29 днів тому +1

      I showed that at 9:00

    • @frankoyer4310
      @frankoyer4310 28 днів тому

      @@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

  • @ross.metcalf
    @ross.metcalf Рік тому

    This was a nice tutorial, thanks.

  • @R0N-VEEAR
    @R0N-VEEAR Рік тому

    Thanks for the great video you got my sub

  • @werti4894
    @werti4894 4 місяці тому

    legend

  • @nitrogen092
    @nitrogen092 Рік тому

    Спасибо! Отличный урок!

  • @williammanning5066
    @williammanning5066 5 місяців тому

    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.

  • @RequiemBrawl
    @RequiemBrawl 6 днів тому +1

    However, how to call getbettergameusersettings in c++ class?

    • @ContinueBreak
      @ContinueBreak  6 днів тому

      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.

  • @bonyfist
    @bonyfist 2 роки тому +1

    mans revived after 3 months, wheeee

  • @Quandinis
    @Quandinis Рік тому

    just a note for any UE4 devs. You can leave GENERATED_BODY() as is. It will compile.

  • @CertifiedGameDev
    @CertifiedGameDev Рік тому

    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?

  • @lo1d
    @lo1d Рік тому

    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

    • @ContinueBreak
      @ContinueBreak  Рік тому

      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?

  • @darktaco1238
    @darktaco1238 Рік тому

    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.

    • @ContinueBreak
      @ContinueBreak  Рік тому +2

      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?

    • @darktaco1238
      @darktaco1238 Рік тому +1

      @@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!

  • @imyokoyoko
    @imyokoyoko Рік тому

    Hi, does this work to save Enhanced input key mappings?

    • @ContinueBreak
      @ContinueBreak  Рік тому +1

      I don't know. I have never tried to use it with enhanced input.

    • @imyokoyoko
      @imyokoyoko Рік тому

      @@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?

  • @definitelynotphsycal
    @definitelynotphsycal Рік тому

    #include "--.generated.h" has an error cannot open source file "-.generated.h"

    • @ContinueBreak
      @ContinueBreak  Рік тому

      Can't tell much from your error. Did you close the Unreal Engine when you tried to build from Visual Studio?

    • @definitelynotphsycal
      @definitelynotphsycal Рік тому

      @@ContinueBreak yes

  • @CRUMVIII
    @CRUMVIII Рік тому

    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.

  • @history3042
    @history3042 Рік тому +1

    the narrator sounds like AI, as does the script

    • @ContinueBreak
      @ContinueBreak  Рік тому +2

      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.