public override void CopyFrom(FDelegateBase <TDelegate> other) { Clear(); FMulticastDelegate <TDelegate> del = other as FMulticastDelegate <TDelegate>; if (del == null) { return; } if (del.IsNative) { FMulticastScriptDelegate otherScriptDelegate = *del.scriptDelegatePtr; int count = otherScriptDelegate.Count; for (int i = 0; i < count; ++i) { if (IsNative) { scriptDelegatePtr->Add(otherScriptDelegate[i]); } else { managedScriptDelegate.Add(otherScriptDelegate[i]); } } } else { FMulticastScriptDelegateWrapper otherScriptDelegate = del.managedScriptDelegate; int count = otherScriptDelegate.Count; for (int i = 0; i < count; ++i) { if (IsNative) { scriptDelegatePtr->Add(otherScriptDelegate[i]); } else { managedScriptDelegate.Add(otherScriptDelegate[i]); } } } }
public override void CopyFrom(FDelegateBase <TDelegate> other) { Clear(); FDelegate <TDelegate> del = other as FDelegate <TDelegate>; if (del == null) { return; } FScriptDelegate otherScriptDelegate = del.IsNative ? *del.scriptDelegatePtr : managedScriptDelegate; if (IsNative) { scriptDelegatePtr->Bind(otherScriptDelegate.Object.GetPtr(), otherScriptDelegate.FunctionName); } else { managedScriptDelegate.Bind(otherScriptDelegate.Object.GetPtr(), otherScriptDelegate.FunctionName); } }
public abstract void CopyFrom(FDelegateBase <TDelegate> other);