关于因打开新界面 隐藏之前界面然后关闭新界面再显示原界面引发的3dui点击事件不响应bug...

75ddfb7119b1f72f80c740c9c8943a67.png

bug

这段代码测试发现是正常执行,事件也是正常销毁的,我绑定了事件之后我给他销毁 说明是正常的,但是为什么绑定后就出问题了,
最后才定位到只要设置可见性为可视就会有bug,

UENUM(BlueprintType)
enum class ESlateVisibility : uint8
{
    /** Visible and hit-testable (can interact with cursor). Default value. */
    Visible,
    /** Not visible and takes up no space in the layout (obviously not hit-testable). */
    Collapsed,
    /** Not visible but occupies layout space (obviously not hit-testable). */
    Hidden,
    /** Visible but not hit-testable (cannot interact with cursor) and children in the hierarchy (if any) are also not hit-testable. */
    HitTestInvisible UMETA(DisplayName = "Not Hit-Testable (Self & All Children)"),
    /** Visible but not hit-testable (cannot interact with cursor) and doesn't affect hit-testing on children (if any). */
    SelfHitTestInvisible UMETA(DisplayName = "Not Hit-Testable (Self Only)")
};

我设置了3dactor的里面的widget显示层级为999都没用,

不去修改主ui没毛病,但是我手痒想把他隐藏,因为显示的区域有点不一样 都是只显示一片区域 但是主ui经常操作的,我又不能给他销毁

最后只能换一种思路实现了

我刚开始想把它的偏移设置走 (设置视口中位置),但是发现没有获取到他原来偏移的方法,

猜你喜欢

转载自blog.csdn.net/u010042660/article/details/132018707
今日推荐