With Unreal Engine 5 being released this past week, I now have to decide whether I jump onto the latest and greatest or lock the engine version to 4.27.2. Below are the pros of each.
Pros of upgrading to UE5
- Continued support from Epic
- Likely to have new features and possible performance enhancements
- Building and packaging for iOS with m1 mac and XCode 13.3 works
- Will likely support newer versions of iOS
Pros of staying in UE4
- Proven and tested to work on iOS
- Unbloated by nanite/lumen
- Currently supports more and older versions of iOS (up to iOS 12.0)
After modifying some of the Unreal Build Tool mac toolchain to work with XCode 13.3, I was able to build UE4 from source, however packaging failed, and I decided not to investigate further. In the other hand, I was able to build UE5 from source and package the game with little trouble, besides having to reinstall XCode. I still have to test the chaos physics solver, however PhysX still works in UE5, for now. The forward shading rendering model works in UE5 and turning off nanite and lumen is pretty straightforward, just have to head over to the rendering section of the project settings and turn off any Lumen things. A downside
So, at the end of the day, looks like there are more benefits to upgrading to UE5. The downsides being that an empty packaged game is now bigger than before (~400mbs), and that due to Epic's conflict with Apple, they have not personally tested UE5 on a live iOS production, therefore expect dragons.
Thanks to RyanB for the initial idea. I've shared an image of the material here and when you are ready for the material to fade out, in blueprint/code you'll also need to follow the steps below.
Make sure you have a dynamic material instance.
Set the "TimeToFade" scalar parameter of the dynamic material instance to the amount of time you'll want the fade to take in seconds.
Set the "TimeOfStep" scalar parameter of the dynamic material instance to the current time in seconds.
Set the "Opacity" scalar parameter of the dynamic material instance to 0.
Here is what it looks like in C++
UMaterialInstanceDynamic* material_instance = static_mesh_component->CreateAndSetMaterialInstanceDynamicFromMaterial(0, static_mesh_component->GetMaterial(0)); UWorld* world = GetWorld(); material_instance->SetScalarParameterValue("TimeToFade", 2.0f); material_instance->SetScalarParameterValue("TimeOfStep", UGameplayStatics::GetTimeSeconds(world)); material_instance->SetScalarParameterValue("IsOpaque", 0.0f);
The benefit of this system vs blueprint tick is you could disable tick on the actors/components if they don't need them anymore saving some CPU resources, however your material will be slightly more expensive.
Anyways, happy fading!