使用
enum class TestEnumType : uint32_t
{
Type1 = 0,
Type2 = 1,
Type3 = 2,
Type4 = 5
};
会出现
TypeError: Can't find (TypeKind.TYPEDEF) in type_map
改成
enum class TestEnumType : int
{
Type1 = 0,
Type2 = 1,
Type3 = 2,
Type4 = 5
};
就好了
这部份在旧版JSB是没有这问题的, 是否一定要使用int?
若是设定档target_namespace没有设定, 出来的JSB的档案register_all_xxx_xx
会有
// Get the global ns
se::Object* ns = ScriptEngine::getInstance()->getGlobalObject();
这段code少了se的namespace 要改成
// Get the global ns
se::Object* ns = se::ScriptEngine::getInstance()->getGlobalObject();
才是对的, 可否帮忙修正 不然每次产生都要手动去修改
若是想自定义JSB的code, 例如jsb_test_manual.cpp
我去使用jsb_test_auto.cpp已经JSB的class
extern se::Class* __jsb_test_class;
在jsb_test_manual.cpp里使用
__jsb_test_class->defineStaticFunction("create", _SE(js_test));
并不会新增到static function里
因为他在auto里面cls->install(), 请问这时后该如何新增class的static function??
Thanks