ExBemined Posted October 10, 2019 Share Posted October 10, 2019 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
morbid Posted October 10, 2019 Share Posted October 10, 2019 Hello Bemined, What SDK version is this? We'd fixed related bug in Filesystem methods for UnigineScript in 2.8. And could you show us the code sample? Thanks. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
ExBemined Posted October 10, 2019 Author Share Posted October 10, 2019 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
morbid Posted October 10, 2019 Share Posted October 10, 2019 Okay, we'll investigate this more carefully. Could you please try this as a workaround: UGUID guid = new UGUID(engine.filesystem.getGUID("ScriptProject.world")); log.message(guid.getString()); Thanks. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
ExBemined Posted October 10, 2019 Author Share Posted October 10, 2019 That seems to work, thanks! Link to comment
Recommended Posts