(client) feat:UI更新 chore:LogUI性能更好,并且修复反复打开Log消失的bug,删除部分非预期的警告
This commit is contained in:
@ -50,21 +50,10 @@ namespace Map
|
||||
var rootObj = new GameObject($"_Entities_{id}");
|
||||
rootObj.transform.SetParent(this.transform); // 将其作为Dimension对象的子对象
|
||||
DimensionRoot = rootObj.transform;
|
||||
// 3. 注册此维度到 Program
|
||||
if (Program.Instance != null) // 检查单例是否仍然存在
|
||||
{
|
||||
Program.Instance.RegisterDimension(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError(
|
||||
"[Dimension] Program.Instance is null during Dimension Awake. Cannot register dimension.", this);
|
||||
}
|
||||
|
||||
|
||||
Program.Instance.RegisterDimension(this);
|
||||
// 5. 处理 defaultOpen 逻辑,设置Program的焦点维度
|
||||
// 确保在自身注册到 Program 之后再设置焦点,这样 Program 内部才能找到它
|
||||
if (defaultOpen && Program.Instance != null)
|
||||
if (defaultOpen)
|
||||
{
|
||||
Program.Instance.SetFocusedDimension(_dimensionId);
|
||||
}
|
||||
|
Reference in New Issue
Block a user