Search Unity

'EventDelegate.Callback' does not contain a definition for 'Method'

Discussion in 'Windows' started by RoberTOOL, Dec 4, 2013.

  1. RoberTOOL

    RoberTOOL

    Joined:
    Dec 4, 2013
    Posts:
    3
    Hello,

    So, I have a little big damn problem around here...

    The complete error message is this:

    I've make a build process with "compilation override" : "Use Net Core", option. When I make a build with "compilation override" : "none" the final Visual Studio project crash when I try to run it!.

    What do you think about this?
    How I can find a solution for this problem?

    Thanks!


    Code (csharp):
    1.  
    2.     public override bool Equals (object obj)
    3.     {
    4.         if (obj == null)
    5.         {
    6.             return !isValid;
    7.         }
    8.  
    9.         if (obj is Callback)
    10.         {
    11.             Callback callback = obj as Callback;
    12.             return (mTarget == callback.Target  string.Equals(mMethodName, callback.Method.Name)); // This ".Method" is the problem
    13.  
    14.         }
    15.        
    16.         if (obj is EventDelegate)
    17.         {
    18.             EventDelegate del = obj as EventDelegate;
    19.             return (mTarget == del.mTarget  string.Equals(mMethodName, del.mMethodName));
    20.         }
    21.         return false;
    22.     }
    23.  
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,896
    Hi,

    what is the type of EventDelegate.Callback?
     
  3. RoberTOOL

    RoberTOOL

    Joined:
    Dec 4, 2013
    Posts:
    3
    Hi Tomas..

    The type is: "delegate"