Skip to content

Commit

Permalink
[unity]去掉plugin用不上的类型定义
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Oct 14, 2024
1 parent b55d23c commit 6aeda0e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ struct WrapData
Il2CppClass* TypeInfos[0];
};

struct PObjectRefInfo
{
pesapi_value_ref ValueRef;
void* EnvPrivate;
};

// sizeof(PObjectRefInfo) do exceed C# sizeof(JSObject)
static_assert(sizeof(PObjectRefInfo) <= sizeof(void*) * 2, "PObjectRefInfo Size invalid");

// begin function in Puerts_il2cpp.cpp
Il2CppObject* JsValueToCSRef(Il2CppClass *klass, pesapi_env env, pesapi_value jsval);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
#pragma once
namespace puerts
{
struct PObjectRefInfo
{
pesapi_value_ref ValueRef;
void* EnvPrivate;
};

#if defined(USE_OUTSIZE_UNITY)

Expand Down
5 changes: 0 additions & 5 deletions unity/cli/UnityExports4Puerts.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
#pragma once
namespace puerts
{
struct PObjectRefInfo
{
pesapi_value_ref ValueRef;
void* EnvPrivate;
};

#if defined(USE_OUTSIZE_UNITY)

Expand Down
2 changes: 0 additions & 2 deletions unity/native_src_il2cpp/Src/Puerts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ static void LazyLoad(const void* typeId)
GTryLazyLoadType(typeId, false, GTryLoadTypeMethodInfo);
}

static_assert(sizeof(PObjectRefInfo) <= sizeof(void*) * 2, "PersistentObjectInfo Size invalid");

void PLog(LogLevel Level, const std::string Fmt, ...)
{
static char SLogBuffer[1024];
Expand Down

0 comments on commit 6aeda0e

Please sign in to comment.