Error loading "Levels\Sample\SampleLevel". Cannot find ContentTypeReader OgmoXNA.OgmoLevelReader, OgmoXNA.

Sep 18, 2011 at 7:07 PM
Edited Sep 18, 2011 at 7:11 PM

I am trying to add OgmaXNA to my project but I am seeing this error when attempting to load a Level:

	Error loading "Levels\Sample\SampleLevel". Cannot find ContentTypeReader OgmoXNA.OgmoLevelReader, OgmoXNA.

The code to load the level looks like this:

	OgmoLevel ogmoLevel = this.Content.Load<OgmoLevel>("Levels\\Sample\\SampleLevel");

I have a reference to the OgmoXNA library, and it contains a OgmaLevelReader class, so I am not sure what is missing. Any thoughts on how to debug further would be appreciated!

I am using the updated 4.0 version from here: http://ogmoeditor.com/forum/index.php?topic=14.0

Sep 18, 2011 at 10:34 PM

Figured it out.  The GetRuntimeReader and GetRuntimeType of the pipeline extension projects were not updated to use the OgmaXNA4 assemblies and name space.

Changes required:

OepWriter.cs

public override string GetRuntimeReader(TargetPlatform targetPlatform) 
{ 
    return "OgmoXNA4.OgmoProjectReader, OgmoXNA4"; 
}
public override string GetRuntimeType(TargetPlatform targetPlatform) 
{ 
    return "OgmaXNA4.OgmoProject, OgmoXNA4"; 
}

OelWriter.cs

public override string GetRuntimeReader(TargetPlatform targetPlatform) 
{ 
    return "OgmoXNA4.OgmoLevelReader, OgmoXNA4"; 
}
public override string GetRuntimeType(TargetPlatform targetPlatform) 
{ 
    return "OgmoXna4.OgmoLevel, OgmoXNA4"; 
}

 

Coordinator
Sep 20, 2011 at 6:38 PM

I'm glad you found a solution!