从master分支拉取puerts,并拉取v8制品,修改puerts插件部分UE5_5以下兼容的宏代码。保证puerts编译通过。包括
CSharpParamDefaultValueMetas.cs和ubtplugin.csproj和declarationGenerator.cpp和PropertyTranslator.cpp对UserDefinedStruct.h的引用
This commit is contained in:
@@ -49,6 +49,32 @@
|
||||
} \
|
||||
}
|
||||
|
||||
#define __DefCDataConverter_v8_impl(CLS) \
|
||||
namespace PUERTS_NAMESPACE \
|
||||
{ \
|
||||
namespace v8_impl \
|
||||
{ \
|
||||
template <> \
|
||||
struct Converter<CLS> \
|
||||
{ \
|
||||
static v8::Local<v8::Value> toScript(v8::Local<v8::Context> context, CLS value) \
|
||||
{ \
|
||||
return ::PUERTS_NAMESPACE::DataTransfer::FindOrAddCData( \
|
||||
context->GetIsolate(), context, DynamicTypeId<CLS>::get(&value), new CLS(value), false); \
|
||||
} \
|
||||
static CLS toCpp(v8::Local<v8::Context> context, const v8::Local<v8::Value>& value) \
|
||||
{ \
|
||||
return *::PUERTS_NAMESPACE::DataTransfer::GetPointerFast<CLS>(value.As<v8::Object>()); \
|
||||
} \
|
||||
static bool accept(v8::Local<v8::Context> context, const v8::Local<v8::Value>& value) \
|
||||
{ \
|
||||
return ::PUERTS_NAMESPACE::DataTransfer::IsInstanceOf( \
|
||||
context->GetIsolate(), StaticTypeId<CLS>::get(), value.As<v8::Object>()); \
|
||||
} \
|
||||
}; \
|
||||
} \
|
||||
}
|
||||
|
||||
namespace PUERTS_NAMESPACE
|
||||
{
|
||||
namespace v8_impl
|
||||
|
||||
Reference in New Issue
Block a user