Jump to content

UGUID in script


photo

Recommended Posts

I'm trying to get the GUID of a file in UnigineScript using the engine.filesystem.getGUID function. According to the documentation it should return a UGUID object, but whenever I try to call any of the functions on it like isValid() or getString() I get the following error:

Quote

Machine::run(): "guid: 47e708c5cbe5e3606413bf3fdcc9c392efdc0dc9" is not an extern class

Is there some error in the documentation here, or does this not work in script?

Link to comment

This is in 2.9.0.2, I can reproduce it by creating an empty UnigineScript project from the SDK browser and insert the following two lines in the generated .usc file (within the init function):

UGUID g = engine.filesystem.getGUID("ScriptProject.world");
log.message(g.getString());

This gives the following error:

Quote
11:00:33 Machine::run(): "guid: bccc09e61633180d11e15a08b987b5c77b2f787a" is not an extern class
11:00:33 World::loadWorld(): world init function returned 0 in "guid://77458e3fe5cb4692ca21b4c995ce37946f80bde3" file

 

Link to comment
×
×
  • Create New...