Frustrations with Unreal 5 and Visual Studio 2022

“Oh boo hoo, let me play a sad song for you on the world’s smallest violin”

As mentioned in the previous post I was getting really excited about the idea of using Unreal 5, given that it’s the latest and greatest that Epic has to offer. I also mentioned some initial troubles, forcing me to report bugs to Epic. As a developer I come to expect some level of difficulty when starting a tool as you learn its nuances, and the fact that most of the “bugs” are likely just your own fault. That view may be jaded from years of using old versions of C++ on very stable compilers, or rather it definitely is jaded as my experience with Unreal 5 has been quite the opposite.

Obviously at this point (Mid-July 2022) Unreal 5 has been out in full force for a couple of months now. As a user I would expect this to mean that we have a very stable tool, with some known issues being worked through that I may have not had to worry about until I was diving deeper into more complicated uses of the tool. Unfortunately, I feel like I am being hit in the face with everything right out of the gate. This isn’t to say that some of these things may be caused by my own doing and misunderstanding, but the things hitting me generally occur when following Epic’s own tutorials.

Given that Unreal 5 is still so new, a lot of their prior documentation for Unreal 4 hasn’t been rewritten for the later version, so I am happily following along in some old documentation. Specifically, for the basic demo game I am trying to develop – a generic horde mode survival FPS – I am working through Unreal’s First-Person Shooter Tutorial for 4.27 as their same tutorial for Unreal 5, seems to be incomplete at the time of writing this post. This is okay, however, as the given concepts are all cross-compatible from what I can tell and have thus far worked for me in my following-along. Maybe this is naïve, but outside of relying on the live coding feature of Unreal 5, everything given thus far in the tutorial has worked, when the tool hasn’t gotten in the way.

The long and short of it is that, given my novice status and desire to simplify as much as I can so that I can focus on learning Unreal and that parts of it that should work, I am considering downgrading to Unreal 4 and Visual Studio 2019 for the time being so I can get along a lot better. Before doing so, I just want to highlight the specific issues I have had so I don’t just seem like I am a 100% whiny baby who is unwilling to learn. If anything, I’d like to demonstrate that I am at most, only 20% whiny baby.

Before diving into the specifics, I will be forthright in the fact that my overall setup may be ambitious as I am using Visual Studio 2022 (17.2.3) and Unreal 5 (5.0.2). Not only am I using the latest version of the Unreal tool, I am also using a newer version of Visual Studio, than is recommended by Epic for either Unreal 4 or 5. Putting that aside, I am an optimist who thinks he can make it work and be ahead of everyone slowly transitioning to the latest versions. Keeping that in mind, let’s dive into the issues I’ve experienced so far.

Live Coding Doesn’t Auto-Compile Upon Reopening a Project

One of the most consistent issues I have experienced with Unreal thus far is a fundamental one that pretty much prevents me from ever restarting my computer or closing the editor mid-project. In the terms of layman and noobie, the general outcome of this bug is such that every time I relaunch my C++ Unreal 5 project (a simple project, mind you) all custom C++ classes are not present in the Content Browser, and all of my custom blueprints lose their parent C++ class.

This is particularly frustrating as even upon a recompile (if that actually works) I am NOT able to reassign the C++ parent to the blueprint class that was originally derived from said class, no matter what route I take. With no easy to find information on how to fix this, the past few nights I have had time to work on the project, my only work around is to recompile the project, and create a new blueprint from the C++ class and redo all prior work to set everything up as specified in the tutorial.

After dealing with this for long enough, I logged my first official bug with Epic. To their credit, I was happy to see a response to this a few days later. I was pointed to the the following ticket, as this is seemingly a known issue. As can be seen in the ticket, the reproducibility is 100%, which is what I experience, leaving me (and everyone else?) with a very pesky issue. One thing I would have hoped to find or have listed in the ticket would be a known workaround that I could leverage in the meantime.

I am Unable to Recompile my Project without Crashes

So there was seemingly ONE workaround to the above issue. So long as I didn’t close Unreal or Visual Studio, I wouldn’t have to experience the aforementioned problems. This is unsustainable to be sure, however, I am trying to minimize my time redoing and maximize the few hours of free time I have learning.

This little maneuever is going to save me ten minutes

This elite, big-brain trickery worked great until I hit the segment of the tutorial that introduces the concept of implementing projectiles. Right as I was really starting to get excited about shootin’ stuff, I encountered a self-inflicted issue that lead to another systemic one. The short form of my woes, being that after implementing a projectile, I was unable to assign the projectile to my character blueprint. Not yet realizing that I had added code specifying my Survivor (a variant on the tutorial’s FpsCharacter) as having a projectile property that was mistakenly set to be a subclass of ASurvivor itself…

// Projectile class to spawn
UPROPERTY(EditDefaultsOnly, Category=Projectile)
TSubclassOf<class ASurvivor> ProjectileClass;

Instead of…

// Projectile class to spawn
UPROPERTY(EditDefaultsOnly, Category=Projectile)
TSubclassOf<class ADefaultProjectile> ProjectileClass;

I thought that my inability to set the Survivor’s Blueprint projectile property as my custom projectile class, was due to some form of issue with Unreal being able to refresh available types. So, begrudgingly, I decided to restart my editor and see what would happen. The end-result ultimately lead me to writing this post so I could whine and justify my desire to go to Unreal 4.

Given no other changes to the project, I am completely unable to use live-coding to compile my project and thus given the prior issue, am unable to have parent’s for my previously created Blueprints. The crash always appears after attempting live-coding and appears as…

Doing some quick Google-Fu I found some related posts, and attempted to perform some work-arounds such as disabling async-loading as that seemed to have helped other people, but it did not solve my problems.

The linked post does state this assertion is also possible in Unreal 4, giving me less qualms about the fact that I will have no problems there, however, their issue didn’t stem from simply following the official tutorials. Though there may be an easy, or available fix I am just stupidly missing, this whole experience has lead me to my last point of the post.

The 4.27 Tutorial Maybe Isn’t What I Need it to Be for Unreal 5

The title says it all. While this experience thus far has been extraordinarily educational and revealed to me more than a smooth tutorial could on its own, I have been left thinking that without an official version of this tutorial for Unreal 5 I am left to suffer through this and figure it out on my own.

I don’t think anyone expects to follow a tutorial for a sophisticated tool such as Unreal is and spend a lot of the time tripping over unmentioned issues. The tutorial is quite clear, and beneficial, but as a user of their own newest and officially-released product I am left feeling like there is something missing for me. Most notably, this tutorial is not taking into account the live-compile technology that seems to be the new default for Unreal 5 C++ projects. This tool is powerful and I am excited to use it in the future, but the buginess of it even just going through Epic’s own tutorials has left me spinning wheels.

Conclusions

I think the obvious conclusions here are…

A. I am using Visual Studio 2022, which is not recommended for any version of Unreal by Epic

B. Some combination of Unreal 5 and Visual Studio 2022 is causing me more grief than I should be seeking out as a novice

C. I will likely have to reattempt my work in this project with Visual Studio 2019 and if that does not work, go a step further by additionally downgrading to Unreal 4

Regardless, given that Unreal 5 was officially released in the year 2022, I would have hoped that integration with Microsoft’s latest offerings would be seamless and that they would have updated their tutorials to coincide with an official release.