Question: Can You Use C# in Unreal Engine?
Answer
No, Unreal Engine does not natively support C#. Unreal Engine's primary programming language is C++, and it also supports visual scripting through Blueprints. C++ is used for high-performance code, and Blueprints are used for quickly iterating gameplay features without the need for compiling.
However, there is a community-driven project called UnrealCLR that aims to integrate C# into Unreal Engine as a third-party plugin. UnrealCLR acts as a bridge between the managed environment of .NET and the native environment of Unreal Engine. Here's a basic example of how one might use C# with a plugin like UnrealCLR:
using UnrealEngine.Framework; namespace HelloWorld { public class Game : ManagedEntryPoint { public override void OnWorldBegin() { Log.WriteLine("Hello, World!"); } } }
Keep in mind that using plugins like UnrealCLR may come with limitations compared to the full native capabilities of C++ within Unreal Engine, and such solutions may not be officially supported or fully compatible with all of Unreal Engine's features or future updates. For official game development and full use of Unreal Engine's capabilities, learning C++ and Blueprint scripting is recommended.
Was this content helpful?
Other Common Game Engines Questions (and Answers)
- Is Unreal Engine Open Source?
- Can Unreal Engine make 2D games?
- Does Unreal Engine Use C++?
- Does Unreal Engine Use Python?
- What Language Does Unreal Engine Use?
- Does Unreal Engine Use JavaScript?
- Does Unreal Engine work on Linux?
- How Do I Uninstall Unreal Engine 5?
- Is Blender or Unreal Engine Better?
- Is Unreal Engine Good for Beginners?
- Does Unreal Engine Work on Mac?
- Why Is Unreal Engine So Laggy?
Free System Design on AWS E-Book
Download this early release of O'Reilly's latest cloud infrastructure e-book: System Design on AWS.
Switch & save up to 80%
Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement. Instantly experience up to a 25X boost in performance and 80% reduction in cost