You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-16 15:16:33 +09:00
Unity defines for read/write reflection
This commit is contained in:
@@ -93,7 +93,11 @@ namespace Lidgren.Network
|
||||
value = readMethod.Invoke(this, null);
|
||||
|
||||
// set the value
|
||||
#if UNITY_WEBPLAYER || UNITY_4_5
|
||||
var setMethod = fi.GetSetMethod();
|
||||
#else
|
||||
var setMethod = fi.SetMethod;
|
||||
#endif
|
||||
if (setMethod != null)
|
||||
setMethod.Invoke(target, new object[] { value });
|
||||
}
|
||||
|
||||
@@ -78,7 +78,11 @@ namespace Lidgren.Network
|
||||
|
||||
foreach (PropertyInfo fi in fields)
|
||||
{
|
||||
#if UNITY_WEBPLAYER || UNITY_4_5
|
||||
MethodInfo getMethod = fi.GetGetMethod();
|
||||
#else
|
||||
MethodInfo getMethod = fi.GetMethod;
|
||||
#endif
|
||||
if (getMethod != null)
|
||||
{
|
||||
object value = getMethod.Invoke(ob, null);
|
||||
|
||||
Reference in New Issue
Block a user