1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 namespace MyGame.Example
4 {
5 
6 using System;
7 using FlatBuffers;
8 
9 public struct Vec3 : IFlatbufferObject
10 {
11   private Struct __p;
12   public ByteBuffer ByteBuffer { get { return __p.bb; } }
__initMyGame.Example.Vec313   public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; }
__assignMyGame.Example.Vec314   public Vec3 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
15 
16   public float X { get { return __p.bb.GetFloat(__p.bb_pos + 0); } }
MutateXMyGame.Example.Vec317   public void MutateX(float x) { __p.bb.PutFloat(__p.bb_pos + 0, x); }
18   public float Y { get { return __p.bb.GetFloat(__p.bb_pos + 4); } }
MutateYMyGame.Example.Vec319   public void MutateY(float y) { __p.bb.PutFloat(__p.bb_pos + 4, y); }
20   public float Z { get { return __p.bb.GetFloat(__p.bb_pos + 8); } }
MutateZMyGame.Example.Vec321   public void MutateZ(float z) { __p.bb.PutFloat(__p.bb_pos + 8, z); }
22   public double Test1 { get { return __p.bb.GetDouble(__p.bb_pos + 16); } }
MutateTest1MyGame.Example.Vec323   public void MutateTest1(double test1) { __p.bb.PutDouble(__p.bb_pos + 16, test1); }
24   public Color Test2 { get { return (Color)__p.bb.GetSbyte(__p.bb_pos + 24); } }
MutateTest2MyGame.Example.Vec325   public void MutateTest2(Color test2) { __p.bb.PutSbyte(__p.bb_pos + 24, (sbyte)test2); }
26   public Test Test3 { get { return (new Test()).__assign(__p.bb_pos + 26, __p.bb); } }
27 
CreateVec3MyGame.Example.Vec328   public static Offset<Vec3> CreateVec3(FlatBufferBuilder builder, float X, float Y, float Z, double Test1, Color Test2, short test3_A, sbyte test3_B) {
29     builder.Prep(16, 32);
30     builder.Pad(2);
31     builder.Prep(2, 4);
32     builder.Pad(1);
33     builder.PutSbyte(test3_B);
34     builder.PutShort(test3_A);
35     builder.Pad(1);
36     builder.PutSbyte((sbyte)Test2);
37     builder.PutDouble(Test1);
38     builder.Pad(4);
39     builder.PutFloat(Z);
40     builder.PutFloat(Y);
41     builder.PutFloat(X);
42     return new Offset<Vec3>(builder.Offset);
43   }
44 };
45 
46 
47 }
48