Mervill / Unity3D-NLua

Everything you need to get started using Lua in Unity3D. Indie & Pro compatible.
Boost Software License 1.0
190 stars 50 forks source link

Got error when in WebPlayer (even in Editor) #7

Open AvalonXT opened 9 years ago

AvalonXT commented 9 years ago

VerificationException: Error verifying KopiLua.Lua:.cctor (): Cannot take the address of a init-only field at 0x1b0f Rethrow as TypeInitializationException: An exception was thrown by the type initializer for KopiLua.Lua

but if I don't use KopiLua (Android, iOS or Standalone) everything is going well.

crimsonzh commented 8 years ago

at kopilua/luaconf.cs : 130 public static readonly string LUA_DIRSEP = Path.DirectorySeparatorChar.ToString(); Path.DirectorySeparatorChar is not allowed to call on webplayer. I think every operation on the file & path is not allowed. change this to public static readonly string LUA_DIRSEP = "/"; The lua is work.