derek.long Posted June 10, 2014 Share Posted June 10, 2014 We have a plugin which externs a variable from C++ which works fine however the plugin may not always be loaded in our case. We're trying to figure out how to handle this from within the Unigine script. We can test if the variable exists by putting it in some test code in an Expression and then calling isCompiled() before trying to access the variable. But even though we branch around the use of the variable Unigine still seems to process all paths of the branching and give a script error at runtime saying that the variable is undefined. Link to comment
craig.biggs_ Posted June 12, 2014 Share Posted June 12, 2014 Unigine devs? Any feedback on this would be greatly appreciated! Link to comment
unclebob Posted June 16, 2014 Share Posted June 16, 2014 Hello there! Sorry for the late reply. You can use get_extern_info function in order to get all extern classes/functions/variables. This function returns a single string containing all extern info so all you need to do is to search for your variable in that string and that's all. Also, make sure you have proper binaries (build with USE_EXTERN_INFO define). Link to comment
Recommended Posts