DEV Community

Ryo Kuroyanagi
Ryo Kuroyanagi

Posted on

8

Using xLua in Unity

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.

Assets\XLua\Examples\ExampleGenConfig.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?)
Enter fullscreen mode Exit fullscreen mode

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.

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more