Using xLua in Unity

RMAG news

This is my note of my testing of xLua. I’m using “Unity 2022.3.27” and URP.

Installation

From the release page, download the source code zip file. The latest build today is “Tag:v2.1.16_with_ohos”.

Put all the files and the folders in “Assets” folder into your Unity project (some meta files, XLua, Plugin folder).

In “Examples” folder, there’s “ExampleGenConfig.cs” and it causes an error.

AssetsXLuaExamplesExampleGenConfig.cs(112,36): error CS0246: The type or namespace name ‘MemberInfo’ could not be found (are you missing a using directive or an assembly reference?)

You can delete the file to use xLua.

Build

Windows

I just built an app for windows in the way we build.

Android

Switch to Android platform. Go to [XLua top menu] -> [Generate Code] to generate platform specific codes. Then, build an APK file.

Please follow and like us:
Pin Share