diff --git a/delegates.md b/delegates.md index 734b67c..29b1acb 100644 --- a/delegates.md +++ b/delegates.md @@ -31,7 +31,7 @@ In UnrealSharp, delegates can be exposed as class members in the following ways: public class ADelegateShowcaseClass : AActor { [UProperty(PropertyFlags.BlueprintAssignable)] - public TMulticastDelegate TestDelegate { get; set; } + public TMulticastDelegate MyMulticastDelegate { get; set; } [UFunction(FunctionFlags.BlueprintCallable)] public void MyFunctionWithCallback(TDelegate singleDelegate) @@ -53,19 +53,19 @@ Delegates exposed to Unreal Engine follow the same syntax as standard C# delegat protected override void BeginPlay() { // Subscribe to the delegate with a callback - TestDelegate += MyCallback; + MyMulticastDelegate += MyCallback; // Invoke the delegate - TestDelegate.Invoke(1337); + MyMulticastDelegate.Invoke(1337); // Check if the delegate contains the callback - if (TestDelegate.Contains(MyCallback)) + if (MyMulticastDelegate.Contains(MyCallback)) { PrintString("Delegate contains MyCallback"); } // Unsubscribe from the delegate - TestDelegate -= MyCallback; + MyMulticastDelegate -= MyCallback; base.BeginPlay(); }