Closed Lachee closed 10 months ago
Hi @Lachee Do you have any ideas on how would that feature work exactly? Some things to consider with this.
AssignQueryResults
this type needs a parameterless constructor. This would require modifying the interface of all generated scripts, or...AssignQueryResults
to run for its initialisation, so a constructor with VisualElement
parameter is probably more appropriate than a parameterless one.Example logic:
If we need to create a field for a TemplateContainer
Type(VisualElement root)
constructor TemplateContainer
I would also like to see a project where this feature is actually useful. In my experience all of the .gen.cs types I used required initialisation. For this reason I most often used constructors with more parameters.
No further input- closing
It would be awesome if the code generation was able to understand templates. At the moment, it just puts it as a TemplateContainer, but i propose it does 2 things:
Template
suffixFor example, it would go from:
To:
Not entirely sure if the template is even required to be exposed outside of the AssignQueryResults function.