Alright, I’ve been using Blueprints for my projects on Unreal 4 for several years, but now I’ve recently decided to get into really learning some actual code with C++.
I’ve been doing some Youtube tutorials from Reuben Ward, simple things like setting up an inventory that prints a list of objects you can “pick up” and have their names reprinted through a debug message from an array of strings. Very simple, very small things.
When I compile ANYTHING using Visual Studio I get to wait around 5 minutes (I can only imagine what it will be like on a larger project) just to see if I fixed a single error. But wait! that’s not all… the intellisense is utterly non-existent (or so slow its actually faster to go onto Bing and just look up the code I’m looking for).
Now, I’ve heard about something called Visual Assist, some people say its supposed to help with improving compile times and (supposedly) with intellisense, but I thought I’d ask around to see how many other people are having these same issues (if anyone is), and if they’ve found any better solutions.
But is it at all possible to make a game using mainly (like 90%) Blueprint? Or will that cause performance issues since I’ve heard Blueprint programmed functionality is slower than that programmed in C++.
Something seems off.
With my projects(average size, not too big or small) it usually takes 10-30 sec to compile. I have i7-4770k and SSD, so if you have it SSD too then difference in compile time should not be THAT big.
Intellisense is non-existent , yeah, I think Visual Assist is not a recommendation, but a requirement for UE4 C++ work. It won’t help you with compile time, though
Here’s one tip around tweaking the Unreal Build Tool parameters that has actually made working with C++ bearable for me - previously, similar to what you’ve mentioned, I’d have to wait anywhere from 1 to 5+ minutes to compile ANY change, no matter small. Using the tip below build time is now 4-5 seconds(!) if I’m only editing a CPP file (e.g. changing logic within existing class methods), and about 50 seconds if I change a header file. So the workflow now is flesh out the class structure as much as possible first, then implementing and testing logic within each function is now VERY quick.
No guarantees you’ll get similar results, but worth a go.
You need to create a file (if it doesn’t exist) - C:\Users<your user>\Documents\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml
Save file, try build again. Then try just changing code in .cpp files (leave headers alone) and build again (just bulid, not rebuild) and fingers crossed it only takes a few seconds.
Note, I trigger my builds from within visual studio, but it should work from the editor too as they both use the same build tool anyway.
Also, regarding intellisense, I’ve tried both Visual Assist and Resharper C++ a fair bit, and although Resharper takes a longer to scan all the files the first time through, in my experience I’ve found it then provides much better info than Visual Assist. It’s only in a fairly recent version that they’ve got it working properly with UE4 though, so just in case you’ve tried it some time back, it’s worth having another go.
Compilation times are fast for me…
But you’re right about Visual Assist X, can’t work on Unreal without it; the built-in intellisense will not work and even Visual Assist will break some times.
A good thing to do is create only base classes in C++ and make functions there to process the heavy calculations; everything else you end up connecting pins on Blueprint side specially now that Unreal will convert back Blueprint to C++ when packaging the game.
The problem with VAssist is for many hobbyists it feels expensive when you need to buy that just to work on UE4 using C++.
Thanks for the excellent info! My sub for VAX is almost up, I think I will try Resharper! – Also, I believe 4.15 will help with compile times, at least that’s what I’ve heard… not tried the preview yet.
Hmm, I had a feeling that when I’d first tried I hadn’t had much luck having the options in the build.cs, which is why I’d settled on the BuildConfiguration.xml. But I’ve just tested again, removing BuildConfiguration.xml and using those exact options in my project’s build.cs and it definitely has the same effect. Changing a “int test = 5;” to “int test = 6;”, compile time goes from 460 seconds without, to 6 seconds with. I also compared VS 2015 and VS 2017 and same result.
Just to confirm - with the 30 seconds, that’s only making changes in a .cpp file? Changing a .h will always take longer
And as Cultrarius suggested do you have an SSD to use for VS and UE4? That was the other thing which helped me a lot.
Yes definitely worth trying out. I’d actually bought a VAX licence just recently as I prefer that to Jetbrain’s subscription model. But with their latest 2 Resharper C++ updates, 2016.2 and 2016.3, they’ve actually made improvements explicitly mentioning Unreal Engine 4, and it did improve things dramatically so I’ve ended up subscribing… I still don’t like the subscription model, but I have to admit it’s a good product
Anyway, main thing I wanted to mention, make sure you check this note if you’re using VS2017, I missed it initally and nearly gave up
Yes, I’m only changing one line in a single .cpp file and I do have everything on the same SSD. I’m on macOS if that might make any difference and using the “Compile” command from within the editor to recompile.
BTW as a side note I must add that CLion (which probably shares the same ReSharper engine for Intellisense) is very good for code completion.
*I just banged my head against the wall with this issue in a Class last term. *
When Intellisense Breaks (aka errors abound but things compile fine ). Close Visual Studio and Refresh the Files.
There is an option to do this from the editor. It’s Under “File” from the menu bar.
**And yes, you might have to do this just because you added a include in a header file. **
Right now I’m using CLion on macOS and it’s way better than Xcode when it comes to indexing a large codebase. Autocompletion is quick and works very well. I noticed in the release log of 4.15 that it says that compilation times are 50% faster than before but I guess it’s for the engine itself only as compiling the game code is still taking the same time.
Did you guys notice any difference?