Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDataAsset support #162

Open
GMatrixGames opened this issue Jul 6, 2021 · 5 comments
Open

UDataAsset support #162

GMatrixGames opened this issue Jul 6, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@GMatrixGames
Copy link

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

@nxrighthere nxrighthere changed the title UDataAsset support UDataAsset support Jul 6, 2021
@nxrighthere
Copy link
Owner

Could you please provide a use case with sub-classes that you need from it?

@GMatrixGames
Copy link
Author

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
image

@nxrighthere
Copy link
Owner

I'll look into this, but it sounds like you will also need #61 for this.

@nxrighthere
Copy link
Owner

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.

@nxrighthere nxrighthere added the enhancement New feature or request label Jul 27, 2021
@celeronpm
Copy link

Just wanted to share our approach with C# Source Generators that we've prototyped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants