level 7
ui里面直接用remove from parent就能删除ui了
2020年08月27日 13点08分
2
但是鼠标还在。。
2020年08月29日 02点08分
@iksing🌊 隐藏鼠标你不是有个set show mouse cursor嘛
2020年08月29日 09点08分
@iksing🌊 如果是不想让鼠标点一下再消失的话,可以在show mouse cursor前面加个set input mode game only
2020年11月27日 05点11分
level 1
先在编辑器里创建UI和一个按钮 按钮名称和代码一致并且把为变量的勾选取消
.h
protected:
virtual void NativeConstruct()override;
public:
UPROPERTY()
class UButton*BTN_0
UFUNCTION()
void HIdeCursorAndUI();
.cpp
void 类名::NativeConstruct(){
BTN_0->Onclicked.AddDynamic(this,&类名::HIdeCursorAndUI)
}
void 类名::HIdeCursorAndUI(){
GetWorld()->GetFirstPlayerController()->bShowMouseCursor=false;
RemoveFormParent();
}
2022年01月21日 10点01分
3