从master分支拉取puerts,并拉取v8制品,修改puerts插件部分UE5_5以下兼容的宏代码。保证puerts编译通过。包括

CSharpParamDefaultValueMetas.cs和ubtplugin.csproj和declarationGenerator.cpp和PropertyTranslator.cpp对UserDefinedStruct.h的引用
This commit is contained in:
2024-12-02 01:03:52 +08:00
parent 850d76173c
commit ed21658256
150 changed files with 31347 additions and 16645 deletions
@@ -490,10 +490,10 @@ struct IsUStructHelper<T, Void_t<decltype(&TScriptStructTraits<T>::Get)>> : std:
namespace v8_impl
{
template <typename T>
struct Converter<T*,
typename std::enable_if<!std::is_convertible<T*, const UObject*>::value && internal::IsUStructHelper<T>::value>::type>
struct Converter<T*, typename std::enable_if<!std::is_const<T>::value && !std::is_convertible<T*, const UObject*>::value &&
internal::IsUStructHelper<T>::value>::type>
{
static v8::Local<v8::Value> toScript(v8::Local<v8::Context> context, T* value)
static v8::Local<v8::Value> toScript(v8::Local<v8::Context> context, const T* value)
{
return DataTransfer::FindOrAddStruct<T>(context->GetIsolate(), context, (void*) value, true);
}
@@ -509,10 +509,17 @@ struct Converter<T*,
}
};
template <typename T>
struct Converter<const T*,
typename std::enable_if<!std::is_convertible<T*, const UObject*>::value && internal::IsUStructHelper<T>::value>::type>
: Converter<T*>
{
};
template <typename T>
struct Converter<T, typename std::enable_if<internal::IsUStructHelper<T>::value>::type>
{
static v8::Local<v8::Value> toScript(v8::Local<v8::Context> context, T value)
static v8::Local<v8::Value> toScript(v8::Local<v8::Context> context, const T value)
{
return DataTransfer::FindOrAddStruct<T>(context->GetIsolate(), context, new T(value), false);
}
@@ -529,6 +536,16 @@ struct Converter<T, typename std::enable_if<internal::IsUStructHelper<T>::value>
}
};
template <typename T>
struct Converter<const T, typename std::enable_if<internal::IsUStructHelper<T>::value>::type> : Converter<T>
{
};
} // namespace v8_impl
template <typename T>
struct ScriptTypeName<const T, typename std::enable_if<internal::IsUStructHelper<T>::value>::type> : ScriptTypeName<T>
{
};
} // namespace PUERTS_NAMESPACE