UnrealCLR
UnrealCLR copied to clipboard
`UDataAsset` support
Hey, I just wanted to ask if there was a way eventually to allow creation of Data Asset types in C# and use them like normal C++ classes.
It would make my life so much easier, but I understand if it's either hard to implement, or not possible.
Thanks
Could you please provide a use case with sub-classes that you need from it?
Hi, currently, this is an example of how it'd be used, you extend UPrimaryDataAsset
or UDataAsset
, have UPROPERTY(s) contained in it, and then also have methods included in it. It would just be easier than C++ having both a header and cpp file where you'd separate the method contents and UPROPERTY(s)
Attached is in C++ for visual representation
I'll look into this, but it sounds like you will also need https://github.com/nxrighthere/UnrealCLR/issues/61 for this.
UDataAsset
requires C++ code generation in order to make it work properly in the editor. Probably generation at runtime is possible, but the plugin doesn't have this feature at the moment. As the closest alternative, you can use UObject
blueprint objects with properties and load them from C# at runtime.
Just wanted to share our approach with C# Source Generators that we've prototyped.