having reached a certain point in further developing the klawr plugin (a fork of enlights great work), i thought i make a thread to keep you updated and answer questions.
klawr is a plugin to use C# as ‘script’ language (not entirely correct, since its compiled into a dll) to use in UE4 (4.8.1-4.8.3 at least, until epic does some harsh changes in UFUNCTION/UPROPERTY, it should work with later versions too).
Whats works now:
Write C# classes and expose them to Blueprints (adding a KlawrScriptComponent to an actor)
Read/Write C# class properties (exposed by the UPROPERTY attribute)
Call Blueprint exposed c++ functions from C#
Limitations:
Works currently only on Win64 (plan is to port to CoreCLR when they fixed some showstoppers)
Only Blueprint exposed functions can be called from C# (not that many are exposed)
Next step:
Make C# methods callable from blueprints DONE
For installation and usage please read the Readme.md in the repository. You won’t have problems if you follow the instructions.
When you add a KlawrScriptComponent for the first time in a project and nothing happens, just restart the editor. It will load properly afterwards.
Thanks for the link, found this one already, but this simple example didn’t help, since its a morphing node. I went with a more complex one of Rama, the ConfigReadWrite Node as a starting point.
I think i’m done with the node at the end of the week. Need to refine the internal wiring and create the call function to pass the parameters on.
Sorry for the late response, work keeps me quite busy these days, dont have much time for playin with UE (workin overtime , thx alot boss :mad:)
I hope i can get more updates soon.
Just to be sure, you did copy over the klawr dll’s to your project folder? (thats not happening automatically)
And can you give me the commit id’s of ue4 and klawr you use please?
i know this problem.
You need to change the CS project (Klawr.ClrHost.Managed) to x64. Yours probably is set to mixed now.
These static asserts have to be met, else COM will not work.