ashwin.sudhir Posted September 19, 2011 Posted September 19, 2011 Hi, Need to check whether a variable contains a valid Node (as opposed to, say, an Image). Tried variable.getNode() but this doesn't seem to have a way to signal failure, it just crashes if the said variable doesn't contain a Node. I tried variable.getExternClassType().getName() but this returns the type of the childmost node of the inheritance hierarchy, so not easy to check if it IS_A node. What is the recommended method for doing this? -a.
steve3d Posted September 19, 2011 Posted September 19, 2011 Variable class also have these functions int getType() const; const char *getTypeName() const; and samples about variable is located at: UnigineSDK-source-2011-09-13\source\samples\Api\Variable
ashwin.sudhir Posted September 21, 2011 Author Posted September 21, 2011 Hi steve3d, I had tried getType() and getTypeName() but they unfortunately return only 'EXTERN_CLASS' not the exact type. I haven't tried with the latest SDK, will do after we update. Thanks.
manguste Posted September 28, 2011 Posted September 28, 2011 Added isNode() function to the API, as well as a number of similar functions, such as isInt(), isFloat() etc. They will be available in the next update.
Recommended Posts