Linus Posted November 7, 2012 Share Posted November 7, 2012 Is it possible to export enum types from C++ to UnigineScript. I couldn't find anything about this in the documentation. For example, if I want use a set of functions like the following in UnigineScript: enum State { STATE_0, ... STATE_i } void setState(State state); State getState(); Link to comment
ulf.schroeter Posted November 9, 2012 Share Posted November 9, 2012 https://developer.unigine.com/en/docs/1.0/code/api/reference/api_unigine_namespace MakeExternConstant will export symbol name and its integer value to UNIGINE script environment. This can be used to export all enum values. There is no way to export a named enum structure like in your example. Nevertheless you could define and export named class which defines some class constants. Link to comment
Recommended Posts