We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b234c91 + 24ab5fa commit 58d5eecCopy full SHA for 58d5eec
Unity/Assets/NativeScript/Editor/GenerateBindings.cs
@@ -3427,7 +3427,15 @@ static void AppendEventAddRemoveMethod(
3427
builders.CsharpFunctions);
3428
builders.CsharpFunctions.Append('.');
3429
builders.CsharpFunctions.Append(eventName);
3430
- builders.CsharpFunctions.Append(" += del;");
+ // TODO: More safely differenciate between add/removing event delegates
3431
+ if (funcName.Contains("RemoveEvent"))
3432
+ {
3433
+ builders.CsharpFunctions.Append(" -= del;");
3434
+ }
3435
+ else
3436
3437
+ builders.CsharpFunctions.Append(" += del;");
3438
3439
AppendCsharpFunctionEnd(
3440
typeof(void),
3441
null,
0 commit comments