[Caelum 0.4] Can't use script


15-04-2009 21:50:20

I'm using Ogre 1.6.2, I'm able to run Caelum fine with default parameters, but if I add - like the wiki states -

Caelum::CaelumPlugin::getSingleton ().loadCaelumSystemFromScript (mCaelumSystem, "DefaultSky");

I get the following error

22:52:04: OGRE EXCEPTION(5:ItemIdentityException): Could not find caelum_sky_system DefaultSky in CaelumPlugin::loadCaelumSystemFromScript at ..\src\CaelumPlugin.cpp (line 138)

despite the fact that Ogre.log states

22:52:04: Parsing script TestSkyScript.os

I tried to declare TestSkyScript.os as a resource of the group Caelum or the Group General, but the problem remained.
Should I load TestSkyScript.os in a specific way ?


16-04-2009 01:00:20

My guess it's the exact same problem as in this topic: viewtopic.php?f=21&t=9241

Basically you need to do CaelumPlugin::install before script parsing; you can't rely on CaelumSystem's constructor. This particular bit of "auto-magic" doesn't really work.