Official C# Support?

I’m glad for you. Keep me informed.

Nonsense.

You are not paying attention. C++ has more problems. Deleting files is just one of them. If this problem is solved, it will be possible to endure other ones. And c++ isn’t the only one thing which has many problems. Unreal editor isn’t so convenient as it could be. So we have to endure its unpleasant aspects too.

1 Like

You’re right im not paying attention cause its the millionth time someone has asked for this and its the most pointless request.

Which request do you think is pointless? Is possibility to manage your source code files in editor pointless?

Here it is! GitHub - pixeltris/USharp: C# plugin for Unreal Engine 4 (Unofficial though)

Thinking about it, I would love to just have something like a C# VM embedded into the engine. It is like developing in Java. If you need speed you replace Java code with C++ code. It is always amazing how small the code parts are that turn out to be really that mission critical that one needs C++ or native libs. And having a complete engine, all the time consuming part is already optimized. I am not sure if C# actually has easy to embedded VM already.

Another option would be using Haxe transpile it to C++ and just keep the C++ export in sync. If the generated C++ code is good enough to let me describe game logic in a high level programming language.

That’s a really odd thing to say. How is it pointless if so many want it? As a game dev, you should know how valuable your users’ voices are.

A large part of this thread seems like it’s the opinions of people that have spent a lot of time with one or 2 of these languages, but not all of them. Honestly, I feel most seasoned devs that know all 3 extensively would say C# is the most efficient to work with. Writing C# is so much faster for writing readable code than blueprints or C++.

Not as odd as replying to a frivolous post from 9 months ago

Except is not. Unreal C++ in big part feels like scripting language to me.

Python could be even faster to write a simple gameplay logic, but it would easily kill performance of every demanding video game. Speed typing text isn’t the only crucial part of programming languages and environments…

Whats probably a better idea before posting you want c# is to go and try c++ in the engine. Get VAX aswell.

You might not have the same opinion once you’ve tried it and realised its really not that much different to c#. Plus the access to the source code is more useful than being able to programe in a slightly simpler langauge.

im not a professional coder but i can use it well enough. So it cant be that hard, im not exactly stephen hawkings reborn.

Either way i have no influence on whether epic add it or not so pointless engaging me on the subject :slight_smile:

Theres two further posts on this thread with links to c# repo’s…look at all the seasoned devs jumping with excitement…oh…literally no one cared…

I disagree with only thing in the post above. Resharper C++ is already much better than good old VAX :wink: :wink:
It’s also the similar to classic Resharper C#, now even included into single license - you buy C++ and C# versions together.

Unreal CLR is actually a nightmare. Game From Scratch gave it a try.

This is how calling C# function looks like…

[USER=“69”]Moth Doctor[/USER] It’s made like that to switch between tests quickly, if you want to make it look clean, you have tools for that. If you don’t like blueprints, you can use only C# code.

You made me curious, sir!
How it look like then? And why “Find Managed Function” event exists? :wink:

Well, it’s not about liking blueprints or any other language. Personal preferences should be thrown out of the window when choosing a programming environment. Especially that part of mechanics usually is exposed to blueprints - for non-programmer people. “Use only code” option isn’t viable at all in UE4.
I don’t accuse of saying “forget blueprints”, just moving discussion forward :wink:

Resharper c++ over vax…blasphemy!

Only joking ive never tried it to be fair i’ll have a look though if you’re saying its better now :slight_smile:

Oh yeah, they put lot of effort into it now. Added more UE4-specific features than VAX. I even suspect that VAX finally added proper support for RPC methods only because Resharper did it first :wink:
Even code inspection mostly works, voodoo magic.

Plus, Resharper C++ is an integral part of Rider, C++ IDE which becomes “the gamedev IDE”. The “Rider for Unreal Engine” preview it’s already better than any other IDE/toolset, just waiting so for a stable release. The first IDE that can be efficiently used for “gamedev C++” out of the box, even Perforce suport is included.

One last thing, 4.26 promises to fix the critical issue of Hot Reload. Something that’s naturally desired by people used to Unity’s “hot reload” mechanism.

“Find Managed Function” is a built-in functionality of Mono framework (now being merged with NetCore API).
You can find functions and variables of managed objects (C# classes) and invoke them from C++, basically that’s how Mono works…

There are two available approaches at the moment that can be mixed: pure C# driven by world events and blueprint functions.

As Bruno correctly noted, Find Managed Function is used to retrieve a function pointer from a cache which is a dictionary with hashed entries essentially, *Execute Managed Function *node is used to execute the pointer. They separated for performance reasons to efficiently reuse pointers during execution. This approach avoids intermediate code-generation pass to make things done on the fly.

Wait, so actually there’s no way to call C# method from blueprint without calling it by a string? That’s perfectly unusable in production :wink:

The lady who implemented Mono framework on Unity editor had a PowerPoint presentation somewhere explaining how it’s done in Unity.

It’s the same thing as using Unreal’s c++ reflection, just automated and hidden from the user.

It’s perfectly usable in production, and it’s a standard way to handle interoperability in other scripting plugins as well, nothing wrong with it. It’s fast, flexible, and straightforward. If you found that runtime cost of using strings has a significant impact on the framerate, then find all necessary methods at startup and reuse pointers.

As Bruno pointed out, it’s the same approach as just using reflection, but 95% of reflection costs, in this case, is full methods compilation and caching at startup as soon as you enter the play mode.

If you don’t like it, then don’t use it. If it’s not suitable for you, then don’t use it.