Jump to content

Can't clear "library/materials/library_sfx.mat" materials library


photo

Recommended Posts

Hi!

 

I'm getting this message whenever I quit the world:

11:42:04 MaterialManager::clear(): can't clear "library/materials/library_sfx.mat" materials library

 

My world script norway.cpp:

#include <common/scripts/CaelumInterface.cpp>
#include <common/scripts/Caelum.cpp>
#include <common/scripts/LightsManager.cpp>


///////////////////////////////////////////////////////////////////////////////////////////////
// Main functionality

int init()
{
engine.game.setPlayer(new PlayerSpectator());

engine.world.addWorld("norway_example/norway6b.world");

Caelum::init();
LightsManager::init();
CaelumInterface::init();

return 1;
}

int shutdown()
{
LightsManager::shutdown();
Caelum::shutdown();

return 1;
}

int update()
{
CaelumInterface::update();
Caelum::updateCaelum();
LightsManager::updateLights();

return 1;
}

 

 

 

My world script norway6b.cpp:

int init()
{
return 1;
}

int shutdown()
{
return 1;
}

int update()
{
return 1;
}

 

Both worlds have reference to "library_sfx.mat" in the <materials> section:

<materials>
	<library>library/materials/library_sfx.mat</library>
</materials>

 

If I remove this reference from the 'norway6b' world, then I stop getting this error.

So is there is a problem? Maybe I should use something else than "engine.world.addWorld" to gather the worlds together?

My idea was to have a dummy world "norway.world" which is essentially empty and add all the 'real' worlds in the init() function using engine.world.addWorld(...).

It works except for this error message.

 

Also if I reference a property library in more than 1 world I get the following error message when I quit the world:

11:50:20 PropertyManager::clear(): can't find "/common/properties/caelum.prop" properties library

 

 

Any ideas?

Link to comment

Any ideas?

 

I only understood your requirement. Please try this following and probably you will find your answer.

1] Create dummy world. With all material references and script references.

2] Use addWorld to append new world to dummy world.

 

At this moment put some log messages in your second world script. Check if second world script log messages are coming?

 

Probably after this you should get an Idea what you should do exactly for your requirement.

 

Please post your observations.

Link to comment

Well, I don't exactly need to figure out if the added worlds' scripts are being run or not, but I did the test - they are NOT being run.

 

The problems however are the following:

1. Whenever I include a material library in more than one world (I load one world which adds a few more worlds), it gives me "MaterialManager::clear(): can't clear "<mat_file_path>" materials library" message when I quit the world.

2. Whenever I include a property library in more than one world (I load one world which adds a few more worlds), it gives me "PropertyManager::clear(): can't find "<prop_file_path>" properties library" message when I quit the world.

 

I was wondering if I'm doing something wrong and how to avoid those messages.

Any help is appreciated.

Link to comment
×
×
  • Create New...