Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
NLua
Commits
1c5f776c
Commit
1c5f776c
authored
Oct 09, 2014
by
Vinicius Jarina
Browse files
Merge pull request #107 from Mervill/Unity3D
Unity3D compatibility (2).
parents
a31a3d5a
67a2a115
Changes
22
Hide whitespace changes
Inline
Side-by-side
Core/NLua/ObjectTranslatorPool.cs
View file @
1c5f776c
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
/*
/*
* This file is part of NLua.
* This file is part of NLua.
*
*
...
@@ -58,13 +58,13 @@ namespace NLua
...
@@ -58,13 +58,13 @@ namespace NLua
}
}
public
ObjectTranslator
Find
(
LuaState
luaState
)
public
ObjectTranslator
Find
(
LuaState
luaState
)
{
{
if
(
translators
.
ContainsKey
(
luaState
))
if
(
translators
.
ContainsKey
(
luaState
))
return
translators
[
luaState
];
return
translators
[
luaState
];
LuaState
main
=
LuaCore
.
LuaNetGetMainState
(
luaState
);
LuaState
main
=
LuaCore
.
LuaNetGetMainState
(
luaState
);
if
(
translators
.
ContainsKey
(
main
))
if
(
translators
.
ContainsKey
(
main
))
return
translators
[
main
];
return
translators
[
main
];
return
null
;
return
null
;
...
...
Core/NLua/Platform/CLSCompliantAttribute.cs
0 → 100644
View file @
1c5f776c
using
System
;
using
System.Runtime.InteropServices
;
#if UNITY_3D
namespace
NLua
{
/// <summary>
/// Disables CLS Compliance in Unity3D.
/// </summary>
[
Serializable
]
[
AttributeUsage
(
AttributeTargets
.
All
)]
[
ComVisible
(
true
)]
public
class
CLSCompliantAttribute
:
Attribute
{
private
bool
_compliant
;
public
CLSCompliantAttribute
(
bool
isCompliant
)
{
_compliant
=
isCompliant
;
}
public
bool
IsCompliant
{
get
{
return
_compliant
;
}
}
}
}
#
endif
\ No newline at end of file
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment