axmolengine / axmol

Axmol Engine – A Multi-platform Engine for Desktop, XBOX (UWP) and Mobile games. (A fork of Cocos2d-x-4.0)
https://axmol.dev
MIT License
923 stars 205 forks source link

Lua script targetPlatform definition miss matched #1176

Closed yangc999 closed 1 year ago

yangc999 commented 1 year ago
halx99 commented 1 year ago

please provide more detail information

yangc999 commented 1 year ago

please provide more detail information

in lua "Constants.lua" definition like this: cc.PLATFORM_WINDOWS = 0 cc.PLATFORM_LINUX = 1 cc.PLATFORM_MACOS = 2 cc.PLATFORM_ANDROID = 3 cc.PLATFORM_IOS = 4 but in cpp Enum like this: enum class Platform { Windows, /< Windows */ UWP, UWP_Phone, Linux, /*< Linux / macOS, /< macOS */ Android, /*< Android / iOS, /*< Apple iOS / };

rh101 commented 1 year ago

So the only thing missing is the new UWP entries in LUA, which is causing the value of the constants to be incorrect when compared to the C++ enum.

yangc999 commented 1 year ago

So the only thing missing is the new UWP entries in LUA, which is causing the value of the constants to be incorrect when compared to the C++ enum.

not exactly.I found lua project can not run in mac platform due to initialize error in device.lua miss matched the platform definition.It may remains others.

rh101 commented 1 year ago

not exactly.I found lua project can not run in mac platform due to initialize error in device.lua miss matched the platform definition.It may remains others.

Have you tried correcting those constants to see if it works?

yangc999 commented 1 year ago

Have you tried correcting those constants to see if it works?

I can only confirm mac platform which runs fine after correcting.