title: A Content pipeline extension for creating game objects and model at the same time
body: <p>I have exported an island.fbx from Blender that I want to import in xna to create an island object:</p>
  
  <pre><code>public class Island
  {
     public Vector3[] Slots;
     public Model Model;
  }
  </code></pre>
  
  <p>One mesh inside the fbx is the model of the island. The processor should create a Model instance from it. The other meshes are slots for buildings. The positions of those should just be put in the Slots array:</p>
  
  <pre><code>public override Island Process(NodeContent input, ContentProcessorContext context)
  {
      Island newIsland = new Island();
  
      foreach (NodeContent nc in input.Children)
      {
          string childName = nc.Name.ToLower();
          if (childName.StartsWith("slot"))
              Helpers.ArrayAdd&lt;Vector3&gt;(ref newIsland.Slots, nc.Transform.Translation);
          else if (childName.ToLower().StartsWith("island"))
              newIsland.Model = ???;
      }
  
      return newIsland;
  }
  </code></pre>
  
  <p>Creating a model instance is the problem.<br>
  I guess I could import the fbx twice (or export two fbx files), once for the Model, another time to create the Island object.<br>
  But that seems like overkill.</p>
  
  <p>How can I perform both steps in the same processor?  </p>