Why Building a C++ Component in Unreal Engine is Easier Than You Think!

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ธ.ค. 2023
  • The Unreal Engine is a powerful tool to create any game you can imagine. Blueprints are integral, but incorporating C++ opens a world of opportunities. This comprehensive video series is designed to guide you through every aspect of C++, starting from the basics to advanced techniques.
    We will create our first Actor Component in this Video. This Video will teach you how to create variables and how to assign variable values inside the property window. It's not just a lesson, it's the beginning of your thrilling C++ Odyssey in game development with Unreal Engine!
    Important URL's:
    - How to setup VSCode for Unreal Engine C++: docs.unrealengine.com/5.0/en-...
    - ActorComponent Class Templates: github.com/ascripture/UnrealC...
    #unrealengine
    #cpp
    #unrealengine5
    #gamedev
    #programming
    #development

ความคิดเห็น • 60

  • @russsully3192
    @russsully3192 5 หลายเดือนก่อน +5

    Awesome work! I will be waiting for the next videos!!!

  • @drili3771
    @drili3771 5 หลายเดือนก่อน +11

    Hope you get more views, the quality and content of the video is great. Keep up the good work!

    • @ScriptedAdventure
      @ScriptedAdventure  5 หลายเดือนก่อน

      Thank you so much for your comment. I really appreciate it!

  • @jackk724
    @jackk724 หลายเดือนก่อน +2

    To all the people commenting that Unreal looks cumbersome and difficult to setup even a single class that's due to the way the creator approached it.
    There's absolutely no reason to create your own .h and .cpp in VSCode the way he did. If he had just taken the first approach of creating a class through the editor he would have a working class without any include errors skipping all the additional steps.
    It's a REALLY strange approach to take based on the title of the video. But I think the idea was to introduce exactly what is happening and explaining the code step by step so you actually learn what's going on. If this was titled something like, What is happening in Unreal C++. Or something like that, expectations would have been better met.

  • @Dominicn123
    @Dominicn123 5 หลายเดือนก่อน +5

    bro, this is exactly what i've been looking for i am so happy lol i've been working in unreal for a year and learned BP but only recently decided to learn C++ over the last few weeks, the only issue is that i don't exactly understand HOW to use it in unreal, this may be exactly what i've been looking for i am so excited!!! i really hope that it's what i mentioned lol because i tried making a new project in C++ and was so confused by how it even works, like opening a project the next time was confusing, i THINK you have to open up visual studio first, and then compile the cpp file, OR in the project, compile via Live Coding first, i don't know.... thats what i mean lol... please please cover those aspects! i've subbed and hit the bell!!

    • @ScriptedAdventure
      @ScriptedAdventure  5 หลายเดือนก่อน

      Thank you so much! In general it is best when you open the project in Visual Studio, do your changes and then recompile the project. Don't bother with Live Coding for now. Instead of Visual Studio I can also recommend Rider. www.jetbrains.com/lp/rider-unreal/
      In February I plan to release a video where we implement a mini-game. So this should be fun. :)

    • @aliksargsyan2782
      @aliksargsyan2782 3 หลายเดือนก่อน

      ​@@ScriptedAdventurewhat about CLion ?

    • @ScriptedAdventure
      @ScriptedAdventure  3 หลายเดือนก่อน

      CLion is great but it's better suited for general purpose C++.

    • @DRockafella
      @DRockafella หลายเดือนก่อน +1

      @@ScriptedAdventure What is Rider better suited for? And how is the "mini-game" tutorial coming along?

  • @drakouzdrowiciel9237
    @drakouzdrowiciel9237 หลายเดือนก่อน

    Good job.

  • @nairolfri
    @nairolfri 3 หลายเดือนก่อน +1

    Really clear video, keep it up !
    Maybe I would remove the music, if I want to listen music I can add it, if I want to focus I usually prefer having only the voice (mostly because english is not my first langage)

    • @ScriptedAdventure
      @ScriptedAdventure  3 หลายเดือนก่อน

      Thanks for your feedback! I agree the music can be distracting. I guess I'll use it more sparingly in future videos.

  • @unrealenginecprogrammingfo4850
    @unrealenginecprogrammingfo4850 หลายเดือนก่อน

    these videos are really good

  • @tnlfla1me746
    @tnlfla1me746 หลายเดือนก่อน

    Can you make video where you setup vscode for ue5

  • @hyper_1337
    @hyper_1337 4 หลายเดือนก่อน +1

    Hi, thanks for this video. Can you please explain to me how to use unreal with Visual Studio Code. I'm using Visual Studio but it has some build issues and also it made me install a lot of stuff to use it with unreal

    • @ScriptedAdventure
      @ScriptedAdventure  4 หลายเดือนก่อน

      Can you share the issues you have? If you have trouble installing Visual Studio, I can record another video showing how to install different IDE's for unreal (Visual Studio, IntellJ Rider etc.). Would this help?

    • @vladdimitrov819
      @vladdimitrov819 หลายเดือนก่อน

      ​@@ScriptedAdventureinstalling Rider and opening a project that was created as a blueprint project initially would be an amazing tutorial!

  • @Galagnoth
    @Galagnoth หลายเดือนก่อน

    Thank you so much for creating these videos!

  • @wufe
    @wufe หลายเดือนก่อน +1

    Thanks for your work!
    I'm new to Unreal Engine, but I'm wondering why in every tutorial I see online the flow is to change code -> start debugging from IDE -> wait for Unreal Engine to start up -> test the code.
    So my question is: isn't the "live coding" feature good enough?
    In my workflow I keep Unreal open all the time, then apply some changes to the C++ code in the IDE, hit to recompile all and the Unreal popup for the live coding shows up, telling me that it has patched the code in real time.
    Is this workflow sustainable?
    (BTW I'm using Jetbrains Rider as IDE, but I found this workflow working also with Visual Studio Community, except for when updating plugins code)

    • @ScriptedAdventure
      @ScriptedAdventure  หลายเดือนก่อน +1

      Hey there, thank you for your comment. Unfortunately, I didn't cover the topic of live coding in this tutorial.
      Live coding is absolutely fine to use and will significantly improve your development speed. However, there are a couple of cases where I would suggest compiling from the IDE instead. These cases include making changes to class structure or touching any configuration files.
      In older versions of Unreal, the hot reloading feature was quite buggy. I suppose this is why many tutorials don't touch this topic, as people who were used to rebuilding all the time need to relearn this as a new habit.

  • @hamzakazmi1451
    @hamzakazmi1451 4 หลายเดือนก่อน

    also on 5:10 when you said to close the engine and then recompile, did you mean close unreal then clicking the build solution option?

    • @ScriptedAdventure
      @ScriptedAdventure  4 หลายเดือนก่อน

      Yes when you do changes in the code you should restart the engine by closing it and then rebuilding the solution.

    • @user-oz5ir2wc8z
      @user-oz5ir2wc8z หลายเดือนก่อน

      ​@@ScriptedAdventure there is a button at the bottom right of the unreal engine editor to recompile the code while the editor is open

  • @hamzakazmi1451
    @hamzakazmi1451 4 หลายเดือนก่อน

    Also is there a certain sequence of things such as first open unreal, click refresh vscode, then open then make changes, then build, then apply changes in unreal?

    • @ScriptedAdventure
      @ScriptedAdventure  4 หลายเดือนก่อน +1

      Yes the usual sequence is:
      1. Close Unreal Engine
      2. Create class files (.h/.cpp) or modify existing ones
      3. Compile the changes
      Refreshing the visual studio code project is only necessary when you actually created a new header file.

  • @RDD87z
    @RDD87z 4 หลายเดือนก่อน

    awesome video, thank you for sharing. Its so sad that its giving so much problems to create a simple code. requires to restart, recompile etc to make everything look clean. i really hope ue fix this one day or maybe make its own IDE inside the ue without all these problems.

    • @ScriptedAdventure
      @ScriptedAdventure  4 หลายเดือนก่อน

      VSCode isn't the best editor for unreal unfortunately. Most of the issues presented in the video can easily be fixed by using a dedicated IDE like www.jetbrains.com/lp/rider-unreal/

  • @MM-od9gr
    @MM-od9gr 13 วันที่ผ่านมา

    For me it says that there's no compiler found, but i have c++ in visual studio code. Did someone also have this problem?

  • @GamerChunkZ
    @GamerChunkZ หลายเดือนก่อน

    👏

  • @usmankhawar888
    @usmankhawar888 3 หลายเดือนก่อน

    You created a new blueprint class and drag that component to the map. Can this part be achieved with coding as well?

    • @ScriptedAdventure
      @ScriptedAdventure  3 หลายเดือนก่อน

      Yes this can be achieved in multiple ways. You can create a C++ actor class and drag it into the scene via the "Place Actors" Window. (docs.unrealengine.com/5.3/en-US/placing-actors-in-unreal-engine/)
      Or if you want to dynamically spawn actors you can use the SpawnActor function (docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Actors/Spawning/)

    • @usmankhawar888
      @usmankhawar888 3 หลายเดือนก่อน

      @@ScriptedAdventure Thanks

  • @hamzakazmi1451
    @hamzakazmi1451 4 หลายเดือนก่อน

    I don't understand my issue, i created 2 files, one cpp and one header (no errors at all) but when build my project i get build errors, how does that make sense

    • @ScriptedAdventure
      @ScriptedAdventure  4 หลายเดือนก่อน

      Can you post the build errors here? Then I can take a look.

  • @ddrr6401
    @ddrr6401 หลายเดือนก่อน

    which mic you use bro

  • @yakovAU
    @yakovAU หลายเดือนก่อน

    I want to make a voxel game in UE5 but most of the resources are in unity or I need to use a plugin. doing it myself is probably out of the realm of my ability lol

    • @ScriptedAdventure
      @ScriptedAdventure  22 วันที่ผ่านมา

      Do you have any particular games in mind? I have never played any voxel game to be honest :D

    • @yakovAU
      @yakovAU 21 วันที่ผ่านมา

      @@ScriptedAdventure 7 days to die and enshrouded have good voxel engines

  • @andreassvensson811
    @andreassvensson811 5 หลายเดือนก่อน

    You managed to fool me with the video title until this point: "4:15" from there the tempo of the video and complicated issues made me lose patience and interest haha. Suddenly things feel unseemly complicated and the flow of the video disappear. Other than that you had a nice flow going on making things feel and look easy! =) Keep it up.

    • @ScriptedAdventure
      @ScriptedAdventure  5 หลายเดือนก่อน +1

      Thank you for your comment! Most of the issues related to Visual Studio Code can be easily skipped when using Rider. www.jetbrains.com/lp/rider-unreal/

    • @andreassvensson811
      @andreassvensson811 5 หลายเดือนก่อน

      @@ScriptedAdventure Thanks for sharing, looks interesting :)

  • @creationallabs
    @creationallabs 5 หลายเดือนก่อน +1

    Imagine prototyping in this thing, a pure nightmare.

    • @earlnuclear
      @earlnuclear 5 หลายเดือนก่อน +1

      You can prototype with blueprint noodles and minimal c++ with no issues, however you most likely will have issues scaling the project up. This isn't even specific to unreal or gamedev, most software projects at a core can be prototyped into their basic approximations fairly quickly.
      Components however are very good for actual architecture of your game as they can be easily reused and refactored if need arises. For example if you are making an rpg you can make an inventory component, which then can be used not only on player and enemies, but also on chests and anything that needs storage. Its a good way of breaking up your code so you don't end up with horrible monolithic god classes.

  • @Bizarium_
    @Bizarium_ หลายเดือนก่อน +4

    Great video, but there is gennuanly no way you sitting there explaining how to create a variable, we know how to do that, i feel like you don't quite have the right target with this video. Just trying to help :D

    • @RyanMcEachern-mr7jc
      @RyanMcEachern-mr7jc 16 วันที่ผ่านมา +2

      His focus is beginner friendly nothing wrong with that approach

  • @GameShorts484
    @GameShorts484 5 หลายเดือนก่อน +9

    most useless game engine for coding. need to work 10x more than unity to compile even a simple script.

    • @natemorga
      @natemorga 5 หลายเดือนก่อน +4

      Yeah i dont even know why you would use this the time to make that box turn was way too long...

    • @clifforderskineart
      @clifforderskineart 5 หลายเดือนก่อน +3

      Yeah I kind of felt the same way, this could be done in a fraction of time in Unity. But UE5 does have some amazing art features built in.
      Its a shame its not very realistic to build a game in Unreal Engine for the solo dev

    • @GameShorts484
      @GameShorts484 5 หลายเดือนก่อน +2

      ​@@natecoley160and they put a showcase about their "pre-rendered" game to youtube and put a title that is like "unreal engine insane graphics fan game - I just did it in one day!" and when you open the video, you see that only one character just walking. worse part is that people are giving thousands of likes and they have no idea what game developing is actually.

    • @tatoforever
      @tatoforever 5 หลายเดือนก่อน +9

      Because thats how you make big scalable games.

    • @shannenmr
      @shannenmr 4 หลายเดือนก่อน +16

      Yes the most used game engine by AAA Studios is the most "useless for coding" outside of it it being the fastest performance wise and having the engine source code fully available for you to modify or just read through and understand... now days with live coding so long as you only Include What You Use compile times are negligible.
      This example is a bit contrived and not how you would usually make something rotate, its designed to show you could take some specific code that might be running slow in BP (large loops, large arrays, a lot of looping math) and move it to a C++ component where you can call it from your existing BP code to have the best of both worlds.