title: Flatbuffers Schema: Vectors of unions
body: <p>I got this error while trying vectors of unions</p>
  
  <pre><code>error: Vectors of unions are not yet supported in all the specified 
  programming languages.
  </code></pre>
  
  <p>Clearly flatbuffers doesn't support vectors of unions. So i need another data type to solve my problem. Here's my case:</p>
  
  <p>Using model Entity Component System (ECS), i have 3 entities and 3 components, here's the structure</p>
  
  <pre><code>EntityA            EntityB            EntityC
      component1        component1        component3
      component3        component2
  </code></pre>
  
  <p>If i can use vectors of unions the schema look like this</p>
  
  <pre><code>union Components { Component1, Component2, Component3 }
  
  table Update {
      component:[Components];
  }
  </code></pre>
  
  <p>Where Component[N] are tables. Actually i have a solution without vectors of unions</p>
  
  <pre><code>table Update {
      component1:[Component1];
      component2:[Component2];
      component3:[Component3];
  }
  </code></pre>
  
  <p>But when list of component increase it's becoming unmanageable.</p>
  
  <p>I'm sorry, i'm using ECS and this is for game development actually. But it's not about the game, so i think this is the right place for asking this kind of problem.</p>
  
  <p>How to solve this without Vectors of unions and better than above solution?</p>