Hi
I have split my loading up into a couple of threads because there is a big load for the game.
The problem that I get is when i try to load in a model and the error message that I get is:
Error:
An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll
Additional information: Value does not fall within the expected range.
The error occurs within this code:
| public void LoadModel(string fileName, Effect Effect, ContentManager content) |
| { |
| //effect = Effect; |
| Model = content.Load<Model>(fileName); |
| absoluteTransforms = new Matrix[Model.Bones.Count]; |
| |
| for (int i = 0; i < Model.Meshes.Count; i++) |
| { |
| modelParts.Add(new ModelPart(Model.Meshes[i])); |
| modelParts[modelParts.Count - 1].Effect = effect; |
| } |
| } |
Each thread has it's own ContentManager instance so that they don't conflict when loading.
Any ideas as to what the problem is and how it could be resolved
Thanks
Andy