Skip to content

FScriptDelegate的使用问题 #471

Closed
@unicodecndddd

Description

在之前的版本中,要调用FScriptDelegate作为参数的函数。如调用

--绑定
local delegate = {self, self.func}
UWidget::BindToAnimationFinished(UWidgetAnimation, delegate)

--解绑
UWidget::UnbindFromAnimationStarted(UWidgetAnimation, delegate)
FScriptDelegate.Unbind(delegate)

以上操作在新版本的游戏用不再生效了。
其中FScriptDelegate.Unbind(delegate)会产生报错,是由于原本记录table作为delegate的缓存被移除了。

绑定后的delegate也不再生效了。

想问一下新版本FScriptDelegate的正确调用方法。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions