Fix sample_binary.py to use latest EndVector without a size. (#6478)

This commit is contained in:
Richard A Hofer 2021-02-19 15:13:50 -05:00 committed by GitHub
parent e6b911d40c
commit 5e3613f732
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -55,13 +55,13 @@ def main():
# Note: Since we prepend the bytes, this loop iterates in reverse order.
for i in reversed(range(0, 10)):
builder.PrependByte(i)
inv = builder.EndVector(10)
inv = builder.EndVector()
MyGame.Sample.Monster.MonsterStartWeaponsVector(builder, 2)
# Note: Since we prepend the data, prepend the weapons in reverse order.
builder.PrependUOffsetTRelative(axe)
builder.PrependUOffsetTRelative(sword)
weapons = builder.EndVector(2)
weapons = builder.EndVector()
pos = MyGame.Sample.Vec3.CreateVec3(builder, 1.0, 2.0, 3.0)