Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AvalonXT opened this issue Jan 23, 2015 · 1 comment
Open

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

AvalonXT opened this issue Jan 23, 2015 · 1 comment

Comments

@AvalonXT
Copy link

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants