We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e3ea4ad + 925ddc0 commit cd415e6Copy full SHA for cd415e6
src/codegen/languages/csharp.ts
@@ -59,8 +59,15 @@ function generateClass(klass: Class, namespace: string) {
59
return `${getCommentHeader()}
60
61
using Colyseus.Schema;
62
+#if UNITY_5_3_OR_NEWER
63
+using UnityEngine.Scripting;
64
+#endif
65
${namespace ? `\nnamespace ${namespace} {` : ""}
66
${indent}public partial class ${klass.name} : ${klass.extends} {
67
68
+[Preserve]
69
70
+public ${klass.name}() { }
71
${klass.properties.map((prop) => generateProperty(prop, indent)).join("\n\n")}
72
${indent}}
73
${namespace ? "}" : ""}
0 commit comments