Hey, iam trying to sync some values to an action event by doing this:
public event System.Action<Vector3> OnTriggerBail
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.Synchronized)]
add
{
this.OnTriggerBail = (System.Action<Vector3>)System.Delegate.Combine(this.OnTriggerBail, value);
}
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.Synchronized)]
remove
{
this.OnTriggerBail = (System.Action<Vector3>)System.Delegate.Remove(this.OnTriggerBail, value);
}
}
public event Action OnTriggerLanding
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.Synchronized)]
add
{
this.OnTriggerLanding = (Action)System.Delegate.Combine(this.OnTriggerLanding, value);
}
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.Synchronized)]
remove
{
this.OnTriggerLanding = (Action)System.Delegate.Remove(this.OnTriggerLanding, value);
}
}
but iam getting the error:
The event OnTriggerBail' can only appear on the left hand side of
+=’ or `-=’ operator
any idea why?