SessionManager not found

Jun 29, 2012 at 4:11 PM
Edited Jun 29, 2012 at 4:11 PM

When I add a session manager it then cannot be found when I try to access it. For example:


SunBurn.AddManager(new LocalSessionManager(SunBurn));

 SessionManager s = SunBurn.GetManager<SessionManager>(true);


throws the Exception:

Service manager does not contain a service assigned to the 'SessionManager' type.


Any idea whats going wrong?

Jun 30, 2012 at 4:56 AM

In 9.2 GetManager requires using the interfaces for the Managers, not the Manager type itself. So you just need to use "ISessionManager" instead of "SessionManager". You'll notice this difference in the current AoS code, as an aside.

Naturally, this is true for all the other managers as well, though something goes a little strange with the BEPUphysics manager-- I had to store my own reference to that one.

Jul 1, 2012 at 9:03 PM

Ah fantastic thanks!