From 25fc12006779ffba8f0060d2d1336059d90c28b4 Mon Sep 17 00:00:00 2001 From: OMGeeky Date: Fri, 3 Nov 2023 21:51:54 +0100 Subject: [PATCH] Add default UxmlFactory if no traits have been added --- ExampleGenerator/Unity/Ui/UIBackingClassGenerator.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ExampleGenerator/Unity/Ui/UIBackingClassGenerator.cs b/ExampleGenerator/Unity/Ui/UIBackingClassGenerator.cs index dfadd9c..a94cd5c 100644 --- a/ExampleGenerator/Unity/Ui/UIBackingClassGenerator.cs +++ b/ExampleGenerator/Unity/Ui/UIBackingClassGenerator.cs @@ -147,7 +147,10 @@ public partial class {classSymbol.Name} source.Append( $@" }} }}" ); } - + else + { + source.AppendLine( $" public new partial class UxmlFactory : UxmlFactory<{classSymbol.Name}> {{ }}" ); + } source.Append( $@" public void QueryElements() {{