跳到主内容
Documentation

1. 获取玩家控制器.md

2025/12/16预计阅读 1 分钟

错误的做法

不要在类的初始化下获取玩家控制器,不然闪退


const auto PlayerController = GetWorld()->GetFirstPlayerController()

建议

在BeginPlay函数获取.

返回顶部