Jump to content

[SOLVED] small suggestion to Object::loadWorld function


photo

Recommended Posts

currently this function just output the wrong surface name, but it warning message don't have a object name, this makes a little hard to find which objects have the problem.

 

for example, we have a lot speedtree objects, they all use similar surface names, as we are porting old projects to new version of unigine, and speedtree version upgrades, I really can't find which tree have this problem.

 

and this suggestion just need little modifications:

 

    // get object name
    String object_name;
    if(xml->isArg("name")) object_name = xml->getArg("name");
    if(object_name.size() == 0) object_name = "";

 

and

 

Log::warning("Object::loadWorld(): %s wrong surface name: \"%s\"\n", object_name.get(), x->getArg("name").get());
Log::warning("Object::loadWorld(): %s surface names are: %s\n", object_name.get(), surfaces.get());
Link to comment
×
×
  • Create New...