public void Assemble(ObjectModel model, GameObject target, AssemblyContext context) { var serializer = GetEngineComponentAssembler(model.GetModelType()); if (serializer != null) { Component comp = target.GetComponent(model.GetModelType()); if (comp == null) { comp = target.AddComponent(model.GetModelType()); } serializer.Assemble(model, comp, context); context.MakeReferencable(comp, model.Guid); return; } Component component = target.AddComponent(model.GetModelType()); ObjectPopulator populator = new ObjectPopulator(); populator.Populate(component, model, context); }