[C#] Fix nested structs and arrays in Object API (#5765)
authorAnass Al <dev@anassinator.com>
Mon, 6 Apr 2020 16:27:13 +0000 (09:27 -0700)
committerGitHub <noreply@github.com>
Mon, 6 Apr 2020 16:27:13 +0000 (09:27 -0700)
commitfb96fadc20a78da264b1878ff95f12838c3b22c8
treea38786659ba6eab03c07c521bcb63f878d8fead0
parent408f11fbdd42bedc86e6a69aecdc77c98b39167a
[C#] Fix nested structs and arrays in Object API (#5765)

* [C#] Fix nested structs and arrays in Object API

The adds support for nested structs and fixed size arrays in the C#
Object API codegen which previously generated invalid code that wouldn't
compile.

- Nested structs would originally generate syntax errors due to adding an
  additional `.` to separate fields.
- Fixed size arrays of nested structs would originally generate code for
  the first field in the top most struct, and would lead to a compiler
  error due to referencing undefined variables.

* [C#] fix nested structs and arrays of structs.

* fix nested structs + arrays

* add table support

* Cleanup code

Co-authored-by: mugisoba <mugisoba+github@icloud.com>
src/idl_gen_csharp.cpp
tests/MyGame/Example/Vec3.cs