Skip to content

Commit cd415e6

Browse files
committed
Merge branch 'master' into 3.0
2 parents e3ea4ad + 925ddc0 commit cd415e6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/codegen/languages/csharp.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,15 @@ function generateClass(klass: Class, namespace: string) {
5959
return `${getCommentHeader()}
6060
6161
using Colyseus.Schema;
62+
#if UNITY_5_3_OR_NEWER
63+
using UnityEngine.Scripting;
64+
#endif
6265
${namespace ? `\nnamespace ${namespace} {` : ""}
6366
${indent}public partial class ${klass.name} : ${klass.extends} {
67+
#if UNITY_5_3_OR_NEWER
68+
[Preserve]
69+
#endif
70+
public ${klass.name}() { }
6471
${klass.properties.map((prop) => generateProperty(prop, indent)).join("\n\n")}
6572
${indent}}
6673
${namespace ? "}" : ""}

0 commit comments

Comments
 (0)