-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Custom Assets can't use inherited types as parameters. #2713
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
Comments
What is the compilation error? |
So I tried to recreate a example project and now I'm getting the error in GameStudio directly as a template error.
I think the original error was happening on build possibly because of an improper clean? I cant seem to get the same error as before but it still does not let me create the asset due to the above. Project example: Once you open the GameStudio, you will see the error when adding the asset |
One more thing to add here as I didn't notice it before and its probably relevant. The inheriting types do not serialize the base class properties. I am assuming I either need to make a custom serializer for the type that includes the abstract data or in my case I found an interface to be more useful for what I was doing. |
Is your feature request related to a problem? Please describe.
I was trying to use a custom asset that used a base type called
BaseItem
as the parameter but it threw errors on compilation.Describe the solution you'd like
It would be a massive time saver to remove the boilerplate of creating individual items when the base type could be used. Below is what I was trying to do:
BaseType:
One of the inheritted types:
Describe alternatives you've considered
The alternative is just to create an asset for each individual Item type.
Additional context
This architecture works within a Component type in a scene of GameStudio but the AssetCompiler seem to be the blocker for here for custom assets.
The text was updated successfully, but these errors were encountered: