From 160ddf07d8d7ed82ea9cff064cfd28ceac045226 Mon Sep 17 00:00:00 2001 From: johnche Date: Thu, 12 Sep 2024 11:19:39 +0800 Subject: [PATCH] =?UTF-8?q?[unity]native=5Fsrc=5Fil2cpp=20ci=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unity/cli/make.mts | 4 ++++ unity/native_src_il2cpp/Inc/JSClassRegister.h | 9 --------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/unity/cli/make.mts b/unity/cli/make.mts index d4dfa028fc..49984f0c80 100644 --- a/unity/cli/make.mts +++ b/unity/cli/make.mts @@ -274,6 +274,10 @@ async function runPuertsMake(cwd: string, options: BuildOptions) { console.warn(`${join(cwd, '../Assets/core/upm/Plugins/puerts_il2cpp/unityenv_for_puerts.h')} not existed! using default one`); cp(join(cwd, '../cli/unityenv_for_puerts.h'), join(cwd, 'Inc/unityenv_for_puerts.h')); } + if (!existsSync(join(cwd, '../Assets/core/upm/Plugins/puerts_il2cpp/UnityExports4Puerts.h'))) { + console.warn(`${join(cwd, '../Assets/core/upm/Plugins/puerts_il2cpp/UnityExports4Puerts.h')} not existed! using default one`); + cp(join(cwd, '../cli/UnityExports4Puerts.h'), join(cwd, 'Inc/UnityExports4Puerts.h')); + } } mkdir('-p', CMAKE_BUILD_PATH); diff --git a/unity/native_src_il2cpp/Inc/JSClassRegister.h b/unity/native_src_il2cpp/Inc/JSClassRegister.h index 92e3005db5..09391c09ba 100644 --- a/unity/native_src_il2cpp/Inc/JSClassRegister.h +++ b/unity/native_src_il2cpp/Inc/JSClassRegister.h @@ -76,27 +76,18 @@ struct JSENV_API JSClassDefinition JSPropertyInfo* Variables; //静态属性 FinalizeFunc Finalize; // int InternalFieldCount; -#if USING_IN_UNREAL_ENGINE NamedFunctionInfo* ConstructorInfos; NamedFunctionInfo* MethodInfos; NamedFunctionInfo* FunctionInfos; NamedPropertyInfo* PropertyInfos; NamedPropertyInfo* VariableInfos; -#endif void* Data = nullptr; }; -#if USING_IN_UNREAL_ENGINE #define JSClassEmptyDefinition \ { \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 \ } -#else -#define JSClassEmptyDefinition \ - { \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 \ - } -#endif void JSENV_API RegisterJSClass(const JSClassDefinition& ClassDefinition);