Ah sorry, didn't realize you don't have win8.
There are two problems in EventDelegate.cs coming from the following code:
#if UNITY_METRO || UNITY_WP8
static string GetMethodName (Callback callback)
{
Delegate d = callback as Delegate;
return d.GetMethodInfo().Name;
}
static bool IsValid (Callback callback)
{
Delegate d = callback as Delegate;
return d != null && d.GetMethodInfo() != null;
}
#else
static string GetMethodName (Callback callback) { return callback.Method.Name; }
static bool IsValid (Callback callback) { return callback != null && callback.Method != null; }
#endif
The first problem is that Unity can not find the Delegate class. Adding System to the import list will fix this, I've added:
#if UNITY_METRO || UNITY_WP8
using System;
#endif
However the second problem is that Unity then gives an error because it can not find the Delegates GetMethodInfo() method. This is a bug from Unity I guess, because the following post claims it should be supported in winphone 8:
http://msdn.microsoft.com/en-US/library/windowsphone/develop/system.reflection.runtimereflectionextensions.getmethodinfo%28v=vs.105%29.aspxBecause I'm in the editor I'm sure System.Reflection is imported, because of the code:
#if UNITY_EDITOR || (!UNITY_FLASH && !UNITY_WP8 && !UNITY_METRO)
#define REFLECTION_SUPPORT
#endif
#if REFLECTION_SUPPORT
using System.Reflection;
#endif
I've fixed the compiler error by changing to the following code (not sure how correct it is though):
#if UNITY_METRO || UNITY_WP8
static string GetMethodName (Callback callback)
{
Delegate d = callback as Delegate;
return d.Method.Name;
}
static bool IsValid (Callback callback)
{
Delegate d = callback as Delegate;
return d != null && d.Method != null;
}
#else
static string GetMethodName (Callback callback) { return callback.Method.Name; }
static bool IsValid (Callback callback) { return callback != null && callback.Method != null; }
#endif
Which I know is a bit silly since the metro/wp8 code basically does the same thing as the code at the #else part only with a typecast to Delegate.