EventDelegate.GetMethodName C# (CSharp) Method

GetMethodName() static private method

GetMethodName is not supported on some platforms.
static private GetMethodName ( Callback, callback ) : string
callback Callback,
return string
		static string GetMethodName (Callback callback)
		{
			System.Delegate d = callback as System.Delegate;
			return d.Method.Name;
		}

Usage Example

Beispiel #1
0
 private void Set(EventDelegate.Callback call)
 {
     if (call == null || !EventDelegate.IsValid(call))
     {
         this.mTarget         = null;
         this.mMethodName     = null;
         this.mCachedCallback = null;
         this.mRawDelegate    = false;
     }
     else
     {
         this.mTarget = (call.Target as MonoBehaviour);
         if (this.mTarget == null)
         {
             this.mRawDelegate    = true;
             this.mCachedCallback = call;
             this.mMethodName     = null;
         }
         else
         {
             this.mMethodName  = EventDelegate.GetMethodName(call);
             this.mRawDelegate = false;
         }
     }
 }
All Usage Examples Of EventDelegate::GetMethodName