cor Posted September 19, 2011 Share Posted September 19, 2011 Hi I have a world script that creates some objects in the world. When I change some values in the script and rerun Unigine the changes have no effect. Only when renaming the world files to some new name and loading those files will have the correct result. Are scripts cached and do I need to clear this cache? Link to comment
danni.coy Posted September 19, 2011 Share Posted September 19, 2011 Assuming you are creating objects on the fly and not adding them to the editor you will need to track these and clear them out when shutdown is run in your world script. Link to comment
cor Posted September 19, 2011 Author Share Posted September 19, 2011 Thanks Danni Can you explain why this is? When I quit Unigine and run it again, why are the objects not correctly generated when I do not clear at shutdown? Link to comment
danni.coy Posted September 20, 2011 Share Posted September 20, 2011 I am guessing here. They should be generated again... If the ones you already created are not removed. if you are checking if the objects exist before creating them than you might not end up creating new objects. Link to comment
cor Posted September 20, 2011 Author Share Posted September 20, 2011 I'm talking about a complete fresh rerun of Unigine. So nothing will be in it initially. It just loads a world corresponding to on old world file. Anybody knows if there is some kind of caching involved that causes this? Link to comment
danni.coy Posted September 20, 2011 Share Posted September 20, 2011 Ok are you adding the objects to the editor (are they being stored in the world file?) Do you have a small piece of example code you can post? Link to comment
binstream Posted September 20, 2011 Share Posted September 20, 2011 https://developer.unigine.com/en/docs/1.0/getting_started/console Try "filesystem_reload" command to reload file system components. Link to comment
cor Posted September 20, 2011 Author Share Posted September 20, 2011 https://developer.un...started/console Try "filesystem_reload" command to reload file system components. I will try that next time is occurs. Thanks. (Didn't happen for a while now) Link to comment
manguste Posted September 23, 2011 Share Posted September 23, 2011 Are scripts cached and do I need to clear this cache? No cache for scripts whatsoever. Every time you run the script anew (reload the world or relaunch the app), objects would be initialized. That is the reason you should not forget to delete them or you will run out of memory. Link to comment
Recommended Posts