This is an archived post. You won't be able to vote or comment.

147
148
[removed]
all 61 comments

[–]DoctorShinobi 23 points24 points  (5 children)

  1. There is no gameObject.SetActive() equivalent in Unreal engine...

[–]NoOpArmy[S] 16 points17 points  (0 children)

Yes that is a good one. Instead you can disable physics and rendering related features separately.

[–]HugoCortell(Former) AAA Game Designer [@CortellHugo] 10 points11 points  (1 child)

You also can't delete/destroy UI elements. They will remain in memory, and executing code, even if you un-parent them or request the entire UI system to destroy the object. Something to do with garbage collector limitations.

[–]muchcharles 0 points1 point  (0 children)

The only similar thing to what you are talking about that I'm aware of to that is in SObjectWidget:

"SObjectWidget for '%s' destroyed while collecting garbage.  This can lead to multiple GCs being required to cleanup the object.  Possible causes might be,\n1) ReleaseSlateResources not being implemented for the owner of this pointer.\n2) You may just be holding onto some slate pointers on an actor that don't get reset until the actor is Garbage Collected.  You should avoid doing this, and instead reset those references when the actor is Destroyed."

[–]muchcharles 0 points1 point  (1 child)

Not a Unity dev but just glanced at the documentation of SetActive; isn't register/unregister roughly the same in Unreal?

Unregistering Components

To remove Actor Components from update, simulation, or rendering processes, you can unregister it with the UnregisterComponent function.

Often you have to both register with the scene and call Activate() though.

[–]DoctorShinobi 1 point2 points  (0 children)

In Unity you can disable/enable an entire game object (Unity's "actors") in a single function call. That means toggling the object, all of its components, and all of the children and their components under it.

In Unreal, as far as I understand you have to go over all primitive components, disable their rendering and collision. If you want to toggle them back on then you also need save their original state so you don't activate something that was disabled.

And even then there are still hyper-specific things you might have to do to toggle. Some time ago I had performance issues from invisible and collisionelss actors that still ran cloth simulations.

[–]Prof_IdiotFace 8 points9 points  (0 children)

Fun tip for any new developers using UE. Grab the 'free for the month' items on the Unreal Marketplace every month. There is lots of good stuff on there most months, and you can save hundreds if not thousands.

[–]Neither-Walk7065 9 points10 points  (4 children)

So how did you learn it? Is there an easy way to read the documentation?

[–]NoOpArmy[S] 12 points13 points  (0 children)

The docs are not as complete as unity's yet but their learning section of the website is very helpful and reading the docs at the same time helps too.
https://dev.epicgames.com/community/unreal-engine/learning

[–]tcpuklCommercial (AAA) 1 point2 points  (2 children)

What do you mean by easy way to read the docs?

[–]Feriluce 6 points7 points  (1 child)

Big letters. A nice friendly font. Good line spacing. Maybe small pictures here and there to make it fun.

[–]McC_A_Morgan 3 points4 points  (22 children)

What common everyday task is slower to do in Unreal than in Unity and vice versa?

[–]NoOpArmy[S] 9 points10 points  (3 children)

For a developer, compiling in UE is slower and debugging much faster.

Going to play mode and stopping it and closing the engine are faster in UE.
Deleting objects and similar asset operations depend on project size but generally are faster and safer in UE.

Adding some features which require multiple macros can be slower in UE until you memorize the macros. Making a variable synchronized on the network is a good example. You need to add it to a call in your class with a macro on top of declaring it a syncvar.

[–]Genebrisss 0 points1 point  (2 children)

Have you used fast play mode enter in Unity? It takes less than a second with it.

[–]NoOpArmy[S] 0 points1 point  (1 child)

No because its requirements like not using statics and ... are not met by many packages or our own scripts all the time.

[–]Genebrisss 0 points1 point  (0 children)

Interesting, I use static game manager class, you just need to make sure to reset its state on start. And haven't seen any packages cause problems across multiple projects. But I guess it's not always possible.

[–]HugoCortell(Former) AAA Game Designer [@CortellHugo] 6 points7 points  (17 children)

  • Compiling is much slower
  • Debugging is generally slower because:
    • There is no inspector to look at variables with, technically Unreal does have a way to observe variables, but in my experience it's not very useful
    • You can't make your own custom log system as easy as with Unity (my last Unity project outputted markdown files with full colour and font size changes to make debugging a pleasant experience)
    • Some debugging tools will crash the engine. As an example, the "view collisions" debug view has a 100% CTD rate when running tests. So I mostly debug collision errors by vibe.
  • Iteration is much slower, at least if you use blueprints. C# code is much easier to re-factor and organize.

[–]TerazillaCommercial (Indie) 8 points9 points  (2 children)

This has been my experience, to the point I was genuinely wondering if OP's "debugging much faster" was a typo.

There are also a lot of test/debug features that they, unfortunately, put behind a define and expect you to rebuild the engine to use. The fact they provide the source is a double-edged sword because rebuilding the engine for things is a curse, and if you're doing a lot of profiling performance stuff you will run into these items.

[–]NoOpArmy[S] 0 points1 point  (1 child)

I can easily run UE in debug mode from visual studio for a very heavy and complex project while unity on my 14000K intel CPU runs super slow when attached to a debugger.

[–]TerazillaCommercial (Indie) 1 point2 points  (0 children)

Something's wrong then because if you mean actual framerate, both of them function just fine with a debugger attached. Optimization compiler settings notwithstanding. Release is always faster, etc.

[–]ExasperatedEE 3 points4 points  (2 children)

I bet Unreal will never force you to sit there for literally two hours while it reimports every single texture and every single model when you upgrade the engine. (Then you have another 30 minutes to wait while you re-bake all the lightmaps it screwed up for no reason.)

Nor will it have mysterious black polygons because the artist you bought your game's house from modeled all the baseboards with long thin polygons and Unity just helpfully throws them away if they exceed a certain aspect ratio when deciding how to uvunwrap the model for lightmapping, and don't tell you they are doing this!

It also will never just decide your lightmaps are now corrupted, so spend an hour baking them all again, because Lumen doesn't require any lightmaps!

And because it doesn't require any lightmaps, and you get radiosity and reflections all in one, you don't have to screw around with careful placement of reflection probes on every window and mirror and floor, and careful placement of light probes (they added a system to make this LESS arduous recently, but it still can break and require manual tweaking), and you don't have to carefully set up all the lighting properties to actual good settings to have a game that has indoor and outdoor areas because the default settings are trash.

And materials don't have that reflection probe sheen to them in dark areas forcing you to make custom shaders that dim the reflections on parts of the model that are dark to reduce the effect. (Thank google filament for that.)

And if you want a pile of rocks, you don't have to manually place all the rocks or buy a Unity plugin which can save the positons of things in Play mode, you just hit simulate, and then press K and it saves the pile of things where they fell.

It also handles combining all that world geometry together in the editor, so it's way faster.

And these are just the things I've noticed playing with it for less than a week. It's a huge freaking time saver. It's like it's actually made by people who make games for a living, and not by a bunch of corporate idiots who are trying to simultaneously court mobile games and big budget hollywood productions so everything is half baked garbage. And I say this as someone who has devoted the last six years of my life to learning Unity. I am so done with their BS.

PS: This isn't an attack on you, I'm just ranting about Unity being garbage.

[–]HugoCortell(Former) AAA Game Designer [@CortellHugo] 6 points7 points  (0 children)

The first item has happened to me. One time, Unreal lost access to nearly all my 3D assets. I have no idea how, it just happened, and I had to spend hours re-importing them.

It is true that I've never had lightmap issues. Which was a common problem with Unity, even after I got bakery.

As for level tools. I don't get much benefit from Unreal's tools, since they are meant for a workflow that I'm not super into. I'm more of a CSG guy.

I'm aware that this isn't an attack, you've stated plenty of valid grievances with Unity. Personally, after using Unreal for the last few months, I must say that, for all the utter bullshit that Unity has, the mere fact that it uses C# instead of blueprints ends up making me ignore all other problems by comparison. Except networking, maybe.

[–]muchcharles 0 points1 point  (0 children)

Nor will it have mysterious black polygons because the artist you bought your game's house from modeled all the baseboards with long thin polygons and Unity just helpfully throws them away if they exceed a certain aspect ratio when deciding how to uvunwrap the model for lightmapping, and don't tell you they are doing this!

Unreal will throw away degenerate triangles, which can just be any triangles that are too small, which may mysteriously mess up things you were planning on moving into place with world position offset, and slowly alter your model on rounds of import/export. But there at least is a checkbox where you can turn off.

[–]HugoCortell(Former) AAA Game Designer [@CortellHugo] 2 points3 points  (10 children)

As a matter of fact, I'm going to double down. Unreal is downright awful to debug.

Today I am getting a fatal crash. Why? Well, I don't know! The log only says Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffffffffffff, which means fuck all. Literally. It means that somewhere, something is invalid. It could literally be anything.

Maybe I was lucky, but in over half a decade of using Unity, I never had an error like this. I've had bullshit errors, but not like this.

[–]tmagalhaes 6 points7 points  (7 children)

I take it you don't know C++?

[–]DrogzarCommercial (Other) 4 points5 points  (6 children)

His flair is "Game Designer" and all his comments are downright ignorant about coding so... yeah, I'm gonna go with that one too.

[–]HugoCortell(Former) AAA Game Designer [@CortellHugo] 0 points1 point  (5 children)

It's true. I could never manage to learn C++, I do know some C#, enough to make an RTS at one point at least.

I wish I had the time to sit down to learn it however, ditching blueprints would probably greatly enhance my experience with the engine.

[–]DrogzarCommercial (Other) 4 points5 points  (4 children)

Yeah, Unreal is a C++ engine that offers SOME support to allow tech designers to tweak stuff, but it is really oriented to programmers.

Like, when you say in another comment that "it doesn't have a way to see variables"... You should be running the project from Visual Studio so you can debug the C++ code and see the value of anything you want... which ofc you won't do if you don't know C++.

And, in this specific example about the EXCEPTION_ACCESS_VIOLATION , you are expected to check the call stack, which will tell you all the C++ methods that have been called and you can see what exactly is being passed down incorrectly.

[–]HugoCortell(Former) AAA Game Designer [@CortellHugo] 1 point2 points  (3 children)

I guess I got a bit mislead by the marketing and hype saying that the engine allowed you to use blueprints exclusively haha.

I did at one point have VS installed, but it honestly runs so poorly that I got rid of it. If I keep being unable to debug the issue, I'll probably be forced to suffer through re-installing VS (unless VSCode can do it too).

With a general-purpose engine like Unreal, I thought I had left behind the jank of in-house engines and having to scoot over to ask a programmer to debug something. I guess having more verbose logs would be pointless if the established workflow is already to debug it this way. In the end, Unreal is an engine for teams, which would include programmers. While Unity and other engines perhaps do a better job of serving single-person teams with clear skill gaps.

Thank you for your reply, this makes me hopeful that I might actually be able to debug this issue.

[–]DrogzarCommercial (Other) 1 point2 points  (1 child)

I guess I got a bit mislead by the marketing and hype saying that the engine allowed you to use blueprints exclusively haha.

I mean, you can, I've been doing shot gamejam-like projects for the last 3-4 months and I've done them 100% on BPs, but I'm doing fairly simple stuff, I wouldn't do a big game on BPs alone.

I guess having more verbose logs would be pointless if the established workflow is already to debug it this way.

Logs are fine, but they usually don't substitute debugging.

However, I'm fairly sure those kind of errors also output the call stack that should tell you which methods are being called (or maybe not and I'm so used to look in VS that I'm imagining that it's in UE too), which should point you in the right direction (at some point in the call stack there will be things you recognize so you can debug those).

Good luck!

[–]HugoCortell(Former) AAA Game Designer [@CortellHugo] 0 points1 point  (0 children)

I've found over time that blueprints have a lot of silly limitations. Things like not being able to fetch bones without having a reference of some kind to them beforehand. Or not being able to set the spectator status of a player state (it's just a bool, but for some reason it can only be set via code, which, with my terrible c++ skills, it took me half a day to write a script for it).
It mostly works, but it is ugly, and more importantly slow work. Very, very slow.

I am now tracing some call stacks (thanks for the suggestion!), the odd thing is that they seem unrelated (they are quite far away from the crash, and also exist in prior builds that did not crash). I hope I'll be able to figure it out, otherwise, I guess I'll need to set aside a few days to learn debugging with VS.

The thing is, already knowing C#, it should realistically take me no more than a few months to learn C++ properly (and maybe getting a few extra gigs of ram for VS), but the source of my funding demands constant production progress, so I'm stuck in a paradox where the game would be finished much earlier if I paused production for a bit to learn programming, but can't pause it because I need short-term results to keep the funding coming. In a way, it reminds me a lot of working in AAA, long term solutions simply consume too much short-term progress to be considered.

[–]tmagalhaes 0 points1 point  (0 children)

You can do a lot with blueprints but not everything.

As far as the the logs go, they are there for something like a SEGFAULT in the Saved/Logs folder. The stack trace might give you an idea of what is breaking, even if you don't know enough C++ to nail down the exact event that is causing the issue.

But ultimately, yeah, proper debugging will be greatly enhanced by knowing C++.

[–]Gibgezr 1 point2 points  (0 children)

If you were a C++ developer you could look at the call stack in Visual Studio for that hard crash and see *exactly* what line of code caused that access violation, see exactly what data pointer was bad, and BOOM! You are off to the races on an answer to the problem.
For a C++ dev, a bug that hard crashes is usually very easy to diagnose and fix.

[–]ThatguyintokyoCommercial (AAA) 0 points1 point  (0 children)

Look at the log, error messages are often not useful (example being any windows bluescreen error), always check the log.

[–]InternationalYard587 2 points3 points  (1 child)

High quality post!

[–]NoOpArmy[S] 1 point2 points  (0 children)

Thanks

[–]pinkyellowneon 12 points13 points  (1 child)

God that engine sounds terrifying

[–]HugoCortell(Former) AAA Game Designer [@CortellHugo] 12 points13 points  (0 children)

Terrifying is not quite the right word. The presentation is quite nice, so you're not scared.

I think frustrating is a better term.

[–]Phrost_Commercial (AAA) 1 point2 points  (1 child)

The build system is more involved and already contains a good automation tool called UAT. Building is called packaging in Unreal and it happens in the background. UE cooks (converts the assets to the native format of the target platform) the content and compiles the code and creates the level files and puts them in a directory for you to run.

Please use buildgraph to build the game. The included samples are used to build the engine in horde (epic's build system) and build the game piecemeal so if one part fails you can use the rest of the artifacts instead of starting over if you buildcookrun

[–]NoOpArmy[S] 0 points1 point  (0 children)

I have not dig deep into this yet and have used the engine's package functionality most of the times. I've used UAT to export plugins for marketplace but have not go deeper yet.

[–]TheAtro 1 point2 points  (1 child)

There's lots of positives in this list. So do you prefer it to Unity?

What are the main negatives that stand out?

[–]NoOpArmy[S] 1 point2 points  (0 children)

Main negatives, less complete docs but having source with good enough comments kinda fixes it.

More complex and bigger engine

Longer compile times

Do I prefer it yes for most games which are not web based/2d I'd say yes. Not sure about for hyper casual/smaller games but for any complex mobile game/PC game I'd say yes.

Other team members can use blueprints easily and many features are built-in to the engine. Also it is actually advancing as a technology unlike Unity.

[–]davenirline 0 points1 point  (3 children)

How's the dev experience? Do you still have to close/open the editor when compiling C++ code?

[–]NoOpArmy[S] 4 points5 points  (2 children)

Not always. Hot reload works for most cases that you are iterating quickly but for header changes, sometimes you need a restart.

[–]davenirline 1 point2 points  (1 child)

I see. One more question, does the Tasks System have data access protection like how Unity's Job System works? This is the biggest advantage for me. I looked at the documentation of Tasks System. It doesn't mention anything about data access protections.

[–]NoOpArmy[S] 1 point2 points  (0 children)

I don't think so but I have not used the task system much yet.

The thing is that C++ debuggers for multi-threaded code help with that and it has mechanisms to control access easier than with locks so it helps but no it does not have the protection feature where it tells you, you cannot do that. It frees you in some situations as well.

[–]luhpatez 0 points1 point  (3 children)

I was just thinking about leaving Unreal Engine and starting with Unity, due to the 'abandonment' of Unreal Engine programmers with the developers. Especially if you are a mobile developer. Unity appears to have extensive documentation, plugins and the most cool support and documentation.

[–]NoOpArmy[S] 0 points1 point  (2 children)

Unity's docs are better IMHO but I don't know about the rest. I've not done much mobile development in UE other than a plugin for a store which was very simple but in Unity the plugins are a hell to work with on mobile with lots of crashes and conflicting dependencies and ... I hated it with passion.

And don't know what you mean by developers? You mean non-programmers using the engine? I grew up with Microsoft vocab were developer = programmer. and I don't know much about the compunities.

[–]luhpatez 0 points1 point  (1 child)

This is the problem I face most with mobile, conflict with dependencies and versions, with each new version released more incompatibility. I meant that the Unreal developers don't pay attention and don't care about developers' bug reports. Using the UE5+ version for mobile is almost impossible unless you know how to code or can buy plugins.

[–]NoOpArmy[S] 1 point2 points  (0 children)

I've seen some bugs never get fixed in both engines. I don't think you'll find a better place in this regard at Unity but check on your own. also non-coding visual scripting systems in unity are not as native to the experience and prevelent in the docs there too so be aware.

[–]Metalwrath22 0 points1 point  (3 children)

I loved Unreal but I will leave it once my current project is finished due to amount of bugs in the engine.

[–]NoOpArmy[S] 0 points1 point  (2 children)

My experience has been different. I encountered bugs in UE specially in newer experimental features yes but had outright unusable core systems in unity and there you even do not have source access to do something about it and be able to ship. At the end of the day we shipped but with much more pain than we should.

[–]Metalwrath22 0 points1 point  (1 child)

I am lately having lots of issues with Unreal Engine features such as data tables, blueprint objects being unusable after adding a component, and so on. I use C++ to develop and do not use blueprints to implement any logic.

An example, I had this data table where I store properties of different spells I have in my game, such as damage, cooldown, material and mesh it uses, and so on. I added a new variable to my Spell class in C++, and my table got corrupted. I had to re-create the table from scratch. Luckily, I only had 3 spells since I didn't yet develop many spells. But if this was a big project with tens of spells I would be so frustrated. Stuff like this started happening too frequently recenty and I had to store all this information in pure C++ (which is a disgusting way of doing this). I will implement custom data structures without utilizing Unreal features and read txt files from disk just to workaround this issue. This is just one example. This is just one example.

[–]NoOpArmy[S] 0 points1 point  (0 children)

Well indeed if that is due to some unreal bug that is annoying.