XNA Creators Club Online
Page 1 of 1 (2 items)
Sort Posts: Previous Next

InstancedModelSample problem

Last post 11/20/2009 6:10 PM by cristiandonosoc. 1 replies.
  • 11/20/2009 4:06 PM

    InstancedModelSample problem

    Hi, sorry if this doesnt go in this section or if it has been asnwered yet (I have searched for an answer, but lo luck :(  ).

    I'm trying to get the instanced model sample into my game and I think I got everything right, but I keep getting 

    Error loading "Models\Cats". Cannot find type MultipleModel.InstancedModel, MultipleModel.

    I found a thread that said I had to update the reference to where the actual InstancedModel class is, and I did. 

    [ContentSerializerRuntimeType("MultipleModel.InstancedModel, MultipleModel")] 
        public class InstancedModelContent 
        { 
            // Internally our instanced model is made up from a list of model parts. 
            [ContentSerializer] 
            List<ModelPart> modelParts = new List<ModelPart>(); 
     
     
            // Each model part represents a piece of geometry that uses one single effect. 
            [ContentSerializerRuntimeType("MultipleModel.InstancedModelPart, MultipleModel")] 
            class ModelPart 

    And here is the class InstancedModel
    namespace MultipleModel 
       
        /// <summary> 
        /// Custom model class can efficiently draw many copies of itself, 
        /// using various different GPU instancing techniques. 
        /// </summary> 
        public class InstancedModel 

    Am I doing something horribly wrong here?? Thx for helping

    (Sorry if english is a little bad)

  • 11/20/2009 6:10 PM In reply to

    Re: InstancedModelSample problem

    :P Found the answer myself. It turned out that the ContentSerializerRuntimeType input was something like ("namespace.class, assembly"). I didnt change the last one. It was as easy as to go to the properties tab of the project and PRESTO!

    Cheers and sorry for the bother
Page 1 of 1 (2 items) Previous Next