Pure Garbage

So I decided to switch to UE4 from Unity just for slightly better graphics. I’m already very experienced C# programmer however I don’t know much C++. I spent a couple days learning C++ and was fairly excited to get started with UE4. While programming C++ I wanted to delete the file and start over. Thats when the problems began. After deleting a C++ file from the editor it doesn’t even actually remove it from your drive. I had to go into VS and delete them there as well. Then when I tried to recreate the class it said it already existed(even tho it did not). So I found out I had to go delete the binaries folder as well as the classes from the drive. I said OK that’s wierd and isn’t this 2020 but ok so I deleted that folder as well. Then I clicked on Regenerate VS files off the Uproject and proceeded to launch the project only to get ERROR “THE FOLLOWING MODULES ARE MISSING OR BUILD WITH A DIFFERENT ENGINE” So I clicked on Rebuild only to get ERROR COULD NOT BE COMPILED. After trying everything for 5+ hours I concluded the entire project is lose simply because I tried to delete a class. Now I don’t want to say this engine is a piece of trash from 1990 but WOW THIS ENGINE IS A PIECE OF TRASH. GOODBYE

2 Likes

It’s just a case of inexperience with the tools. Let’s go through it step by step.

  1. Removing a class from UE

You can’t delete the class from inside UE’s content browser, that makes no sense. Instead:

  1. Delete the .cpp and .h files in Windows Explorer, usually in Public and Private under Source.

  2. Delete the same files from the VS project (or regenerate the project files. Either works, but if you regenerate you lose any custom schemas.)

  3. Build the project in VS to ensure that the class removal didn’t break the project. If it doesn’t build, fix it until it does.

  4. Launch the project.

  5. Fix a project that won’t launch because of a build error

  6. Load VS.

  7. Build the project.

  8. Fix errors until it builds.

  9. Launch the project.

  10. When should I delete the Binaries folder?

Almost never. You only do this if the project is NOT detecting code changes and doesn’t offer to rebuild. More often than not though you want to build from VS, as you get persistent error output there. Building on project load is merely a convenience for things that you know work, such as third party plugins.

So if you still have your project go back and follow these steps. It’s not even minorly broken on the normal scale of things, you just haven’t been shown how to use VS and UE together yet. Following these steps will make it clearer.

I admire your patience Antidamage but any forum poster that posts in capslocks should not deserve any answer. They are better off being ripped of paying for features from unity’s asset store, that are already included for free in UE4.

OK i’ll give it one more shot. Thanks for the info Antidamage. (ps pulsetense its called shift not capslock and I make all my own assets…)

I was gonna say - you can delete C++ classes from the editor? :stuck_out_tongue:

Just takes a bit of time to get used to the flow, then its relatively painless.
There is also hot reload and live coding to consider, though people have different rates of success using them.

Keep in mind that that you prototype pretty rapidly in Blueprint too, then make a C++ version later if required.

The amount of C++ / Blueprints you need will vary depending on the project too.

I think capslock rage is quite understandable, any of us might have been frustrated to that point. I remember posting same stuff about blender UI…

I agree that deleting files works not really obviously. I usually just create new .h and .cpp files instead for prevent interrupting my workflow, and then, some days later, remove unused classes.

Also, enable live coding if you still didn’t.

1 Like

The OP is actually right. First of all I have been using unreal for 6+ years now and I touched pretty much every field in the editor aside from online stuff. Now:

Unreal is ok on the surface (only OK, its full of hidden checks and absurdly complicated stuff). You can do cool things with blueprints and the workflows are generally fast and understandable for the standard things. BUT, as soon as you want to make something a little different of what unreal default offers you are f***, good luck messing with anything editor related in c++.

Overall c++ unreal is a mess, its a made on the way engine where most of things are absurdly overcomplicated even for the simplest tasks. Its slow as hell to compile and hotreload its itself a bug. Unreal have built in systems yes, but they are too complicated for they own good and very difficult to extend or build upon. This brings me to the documentation.

Documentation you ask? Good luck with that, the doc is literally a copy paste of the engine comments. Its too hard to ask for examples?? Example proyects like plataformer,rpg,racing examples where a good start point, but since fortnite grow in popularity all stopped. And now there is only unfinished features advertised as the next big thing: rtx,niagara,chaos,planetary scale volumetric fog and clouds, nanite (AKA zbrush direct import), lumen (no more baking they said…), … and a long list of growing features very far from production ready and without basic documentation aside from the most basic concepts.

As **zoomyjs**said, its 2020. I dont want to sound mad, UE its a good engine, but as user experience is far from good. Nowadays the amount of diversification this engine is getting into, lacking even basic things like usability or documentation is beyond me.

Thanks for the explanation, people willing to help is what keeps us all here after all. But you have to agree that all that pain to remove a class big or small is just a nonsense nowadays.

2 Likes
  • There are full examples of complete games on the Launcher under the Learn tab - both for C++ and Blueprint. You can’t really get better documentation than that. Some of them form the basis of a lot of very big games made in Unreal.

  • Engineers have better things to do than write documentation - and for that reason, documentation will always only ever cover the most basic topics. I’ve been using UE4 since day one, and I don’t think I’ve ever once looked at the API docs for example. If you want to use C++ effectively, you should get comfortable with navigating through a huge codebase (get a copy of Visual Assist X or Resharper to make life easier) - which brings me onto my next point:

  • Unreal is a HUGE codebase and a MASSIVE toolset. You cannot jump from a different language in a different engine, and expect everything to translate. If you are new to Unreal Engine, you ***MUST ***start in Blueprint. Not only will it teach you the API faster than any documentation will, you will get an understanding of how Unreal’s architecture expects you to build things, and where to look when you need something. Blueprint is an essential part of the UE4 workflow, so you should spend a lot of time using it anyway.

  • It’s also worth bearing in mind that C++ is a language with no safety barriers. If you write invalid code, you will crash. That’s not a fault of Unreal, that’s just how C++ is. I don’t really understand the notion of “Unreal C++ is a mess”, because it’s anything but.

  • Don’t use Hot Reload, frankly it needs to be removed from the engine and I wish Epic would do it sooner rather than later. You can’t make changes to class layouts or constructors using either Hot Reload or Live Coding (well you can, but there are limits). If you want to remove a class, you need to close the editor and recompile - that being said, you’ve got into a bad workflow if you find yourself needing to rename/delete C++ classes all the time. You should have a pretty solid grasp of what you want to do before you put hand to keyboard.

Man, I get what you mean. But you just cant expect everyone to be an expert at day one, power to you if you like how it is but people is expecting to make games in deadlines. I dont see how spend more time on doing the game instead of thinking how to do it its a bad thing. What about some short examples or explanations about the subsistems in the docs instead having to download several proyects and dig into them to see how the hell to use a function?

“Engineers have better things to do” Ehhh like understandable systems that other people will use? Who said that them should write the docs? There should be experimented staff to explicitly write the documentation. People that know the engine like you seem to know for example to save time for thousands of people.

I said unreal c++ is a mess because how overcomplicated everything is, even the syntax. “C++ is a language with no safety barriers” has nothing to do with it. I agree that the best way to learn is to dig into the code, but unreal code is a pain to read. If you are having trouble with some code you can spend hours and hours looking up huge chains of check functions just to arrive to a boolean change of any random class or an endessly branching rabbithole, or implement your own code using some simple functions. Saddly there are not many “simple functions” in unreal since everything is tied up with everything, and you end up in the first option.

As you said unreal is huge, and some information about how all works apart from comments on subsystems of subsystems or a basic “this are the windows of the x new system, dont use too much of y! good luck” is a nice feature no matter what for everyone. Right now trying to expand or build upon the editor using c++ is a nightmare and usually takes so much resources that is just not even a posibility. Hot reload was just an example of an avoidable waste of everyones time, the engine is full of little things that take you hours to figure out because they should not cause random behaviours in the first place.

And no, deleting a class is overcomplicated and it should not have to. Its not rignt just because you dont do it often. Aside from the obvious right click in content browser > delete and done. Why not just right click on the content browser > delete cass and the editor itself close and do all that cleaning and recompile? This are the kind of things you would expect from a program 20+ years ago, not today.

2 Likes

This sounds like an AA meeting thread…
Hi 1.5 Year addict here. I know a lot of different languages.
ue4 c++ is just C++. Yes, some things are hidden. Yes, some things are counterintuitive. Yes some times you want to strangle the engine.
That’s really normal on just about any language when you first start.

Coming in with a base of C is easy / asusming it is C and not that trash m$ sells off as C that is actually C#.

Obviously if you do come in with C# as a base (like op) you actually could have some really bad habits that cause issues -or you may just not be used to things working like 1975…

I don’t mean to be brash, but threads that are titled “Pure Garbage” on a professional forum do tend to rub people up the wrong way, and they certainly don’t encourage people to help you. We were all rookies once, but there’s a way to approach it.

I saw a YouTube video recently claiming that Unreal was difficult to learn because “it just crashes and doesn’t tell you why” with 50K+ views - it’s frustrating to see such misinformation being broadcast at such a high level.


My personal recommended path for Unreal is that if you really want to learn these tools, start in Blueprint, study the content samples, then move to C++ later. Even if you’ve spent years in C# (lets be honest, we’re talking about Unity), very little of what you learned there will translate directly accross. BELIEVE me, the same is true in the other direction too.

Once you get to that stage - I highly recommend taking some guided C++ courses to get started. Tom Looman’s Udemy course is quite renowned (I haven’t seen it personally, but Tom does a lot of good stuff so I’d vouch for it for sure).

That’s is pretty much what I mean - nobody can expect to be an expert on day one, and these initial struggles are part of the learning process. This applies to any toolset of a significant size though, and while I agree UE4 has a high barrier to entry, saying it’s hopeless after six years of trying is just fundamentally untrue IMO.

Believe me I know the struggle, I started in UE4 during it’s beta with no prior programming experience at all (in any language). Fast forward a few years, now I’m a senior with some shipped titles, so I know from experience that it can be done if you stick with it, ask the right questions, and adopt the workflow the engines wants. Believe me though, once you get used to Unreals C++ API and all the things it has - you start to wish other software followed some of the same paradigms.

It’s more an issue of misundertanding. The problem is that newcomers (especially when coming from other engines) try to treat C++ as the equivalent of a scripting language, but it’s not a scripting language and it’s not meant to be. You will naturally meet resistance trying to treat it like one.

Scripting in UE4 is done in Blueprints, where you can rename, delete, move files and do whatever you like with them. For better or worse, there is no first-party text-based scripting language in UE4. C++ is for framework-level, “proper” programming. For that reason it requires a deeper understanding of programming and computer science in general and once you have that, it becomes clear why you can’t do certain things. Live Coding is a relatively new development, and there’s a reason for that.

As for deleting files - Close the editor, delete the files, then relaunch in Visual Studio. You can remove the file references from VS yourself, or regenerate the solution file if you prefer (contrary to popular belief you actually don’t need to regenerate solution files all the time, if ever).

I dont understand this. why on earth would you ever try to delete code from content browser? are cpp files called content?
how do you open them, modify them? you open visual studio, open a file, change things, compile. why would it be different for deletion? you go into visual studio, look up the file, delete it and ya done. like in any visual studio project. only thing that may be confusing is that visual studio sometimes not deleting the actual file, only just stops referencing it, so you may have to go and delete the file manually. this can happen with any project not just unreal. more of a visual studio problem than unreal.

other thing is debugging, you said “overcomplicated functions”. id argue with them being overcomplicated, thinking about what they can do, but here is one thing. at least in unreal you can go and check whats happening. can you do it in unity? can you check the source, or see the callstack?
checks are there so you can see why things are crashing. complaining about them being there, and at the same time complaining about too little information about crashing…

"But you just cant expect everyone to be an expert at day one, power to you if you like how it is but people is expecting to make games in deadlines. "
If you don’t even know the engine, why do you have deadlines? This whole logic is wrong. You need to get comfortable with the engine first, then make games for profit. Not the opposite.

A thousand times, this. To be fair, I think that comes from a bunch of different source:

  • People coming from Unity where C# is running in Virtual Machines, so it effectively is a scripting language. Rather than traditional C# development where you can’t do hot-reloading.
  • Epic trying to appease those people and “improve” workflow by adding Hot Reload / Live Coding. However, no engineer is going to use those tools (maybe if you’re tweaking logic, but even then why not just use CVars?), they’re just newbie traps that lead to frustration.
  • Schools and Colleges only teaching high level languages (Java, C#, Python) so people come out expecting those workflows.

I agree with TheJamsh, remove Hot Reload / Live Coding. Teach people the proper way to work within Visual Studio if they are using C++ projects (it’s worked well for the last 30+ years), and stop trying to prevent newbies from blowing off their own foot - instead teach people WHY they blew off their own foot.

If the goal of the business that pays the engineers’ paycheck is to deliver tools that other developers can use effectively, perhaps that statement isn’t actually true. Then again, there exists a job called “technical writer” – and maybe we as an industry should hire more of the people who used to be journalists and used to explain things on paper, but now can’t compete with click-bait auto-generated anger sites, to solve exactly that problem. Depending on how fast your API moves, and how much you believe that documentation is a challenge for your business, that could be useful.

100% this!

I use Hot Reload ALL THE TIME! It’s, as the kids say, the freakin’ BOMB! Don’t go dissing hot reload!

I think that’s fine. Cat picture sharing sites need to be built.

Systems programming, however, is something different. Applications Development is different from Systems Programming. And high-performance low-level computing is about systems programming. And Unreal Engine is about high-performance low-level computing. There’s no shortcut to getting experience in this area if you don’t have it. You may have the expectation that Game Development is Application Development, but it really isn’t.

I see I didnt understand well some TheJamsh arguments at first. Its nice to hear from other developers adventures with the engine c++ part ^^

Totally agree with the fact that if you dont know well enough the engine you shouldnt have strict deadlines. What I mean by deadlines is that at least in the AA level I work things are not allways “the ideal way”, if you know what I mean. Nontheless yes, it should be avoided at all cost no matter what.

What? Teach me! Live Coding is just a way to skip through editor reloading, what’s wrong with it? It directly affects programmer’s efficiency.
Write correct code immediately / write unit tests? Ok, but what if I’m working on some random generator and plugging, adding and rearranging functions while constantly recompiling the code?

I can see the appeal if you’re just tweaking logic (as I said in my previous post). For something like procedural generation, I would design a system that works with rapid iteration and is data driven so you get the flexibility of rapid iteration, with the extensibility of data driven code. Something like the Voxel Graph system that the Voxel Plugin Pro by Phyronnaz does.

Before you get to that point, you need to get the algorithms right. Procedural generation is at least as much art as it is programming. It turns out, Hot Reload is a rapid iteration system, so, you know, it’s already there!
(As for when Visual Studio will bring edit-and-continue to x86_64, we’re all waiting and hoping – it was great when it worked on x86!)

I’ve been working in Ubisoft for three years, try to dive into that codebase with only prior experience with game maker’s like Unity and you’ll wanna shoot yeself. I’ve seen comments on reddit on how Unity is better for programmers than Unreal because its C# and C++ is for sado-masochistic dummies. People do tend to forget what “real” programming is, many languages (and misuses of them khmUnitykhm) are “lack of basic computer science” proof, while C++ isn’t, it will let you shoot yourself in the leg, arm, balls and head if that’s what you fancy.

To use C++ effectively you need knowledge and understanding, it will be tough and it will be rough, but you can’t be great at something without getting your hands dirty.

I take it back this engine is far from pure garbage… definitely there is a learning curve as with anything. Its been a few days and I pretty much have the hang of c++ I’ve already made a controller class that moves around added Ucomponents set timers(UE4 crashed about 10x till i found out you cant keep timers in the constructor) even made a class that disables objects out of range of the player. The coding isn’t hard just much more of it. In unity its OnTriggerEnter(Collider other) in UE4 its void OnBoxBeginOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult); lol

Only problem now is calling animations. I can’t find much information or tutorials for calling animations from C++ and when I do find one its just someone saying don’t call animations from C++ and do it from blueprints(which i hate). Anyway I’m definitely not going back to unity UE4 is just tooo pretty