We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
绑定 UButton 的 OnPressed 事件总是失败 平台: Win11, UE 5.1
在Widget的PreConstruct中 给按钮的OnPressed 添加回调
[IsOverride] public void PreConstruct(Boolean IsDesignTime) { // btn_About = Unreal.NewObject<UButton>(this, UButton.StaticClass(), "btn_About"); Console.WriteLine("------1"); btn_About.OnPressed = new FOnButtonPressedEvent(); Console.WriteLine("------2"); btn_About.OnPressed?.Add(f); Console.WriteLine("------3"); }
尝试过 不给 OnPressed new 对应的 事件对象, 以及自己new一个UButton 并 set给 btn_About, 结果一样 Debug模式下可以看到 btn_About.OnPressed为Null对象, set后仍然是空对象
The text was updated successfully, but these errors were encountered:
ff482b9
No branches or pull requests
绑定 UButton 的 OnPressed 事件总是失败
平台:
Win11, UE 5.1
在Widget的PreConstruct中 给按钮的OnPressed 添加回调
尝试过 不给 OnPressed new 对应的 事件对象, 以及自己new一个UButton 并 set给 btn_About, 结果一样
Debug模式下可以看到 btn_About.OnPressed为Null对象, set后仍然是空对象
The text was updated successfully, but these errors were encountered: