Skip to content

Commit a214aee

Browse files
committed
refactor: 将 resourceHelper 重命名为 m_ResourceHelper 以符合命名规范
将私有字段 resourceHelper 重命名为 m_ResourceHelper,以统一遵循项目中的私有字段命名约定(使用 m_ 前缀),提升代码一致性。
1 parent ee74f10 commit a214aee

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Runtime/FairyGUIPackageComponent.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public sealed class FairyGUIPackageComponent : GameFrameworkComponent
5353
[UnityEngine.Scripting.Preserve]
5454
private readonly Dictionary<string, TaskCompletionSource<UIPackage>> m_UIPackageLoading = new Dictionary<string, TaskCompletionSource<UIPackage>>(32);
5555
[UnityEngine.Scripting.Preserve]
56-
FairyGUILoadAsyncResourceHelper resourceHelper;
56+
private FairyGUILoadAsyncResourceHelper m_ResourceHelper;
5757

5858
/// <summary>
5959
/// 表示 UI 包的数据结构。
@@ -228,7 +228,7 @@ public void RemovePackage(string packageName)
228228
{
229229
uiPackageData.Package.UnloadAssets();
230230
UIPackage.RemovePackage(packageName);
231-
resourceHelper.ReleasePackage(packageName);
231+
m_ResourceHelper.ReleasePackage(packageName);
232232
m_UILoadedPackages.Remove(key);
233233
}
234234
}
@@ -248,7 +248,7 @@ public void RemoveAllPackages()
248248
package.UnloadAssets();
249249
}
250250

251-
resourceHelper.ReleaseAllPackage();
251+
m_ResourceHelper.ReleaseAllPackage();
252252
UIPackage.RemoveAllPackages();
253253
m_UILoadedPackages.Clear();
254254
}
@@ -301,8 +301,8 @@ protected override void Awake()
301301
{
302302
IsAutoRegister = false;
303303
base.Awake();
304-
resourceHelper = new FairyGUILoadAsyncResourceHelper();
305-
UIPackage.SetAsyncLoadResource(resourceHelper);
304+
m_ResourceHelper = new FairyGUILoadAsyncResourceHelper();
305+
UIPackage.SetAsyncLoadResource(m_ResourceHelper);
306306
}
307307
}
308308
}

0 commit comments

Comments
 (0)