狗屎Minimax坏我代码
This commit is contained in:
@@ -50,13 +50,15 @@ namespace Cielonos
|
||||
/// <returns>如果成功找到,返回 true</returns>
|
||||
public bool GetVolumeComponent<T>(out T component) where T : VolumeComponent
|
||||
{
|
||||
component = null;
|
||||
if (componentCache == null) return false;
|
||||
|
||||
Type type = typeof(T);
|
||||
|
||||
// 1. 尝试从缓存中获取
|
||||
if (componentCache.TryGetValue(type, out var cachedComponent))
|
||||
{
|
||||
component = (T)cachedComponent;
|
||||
return component != null;
|
||||
}
|
||||
|
||||
// 2. 如果缓存中没有,从 Profile 中获取
|
||||
@@ -69,7 +71,6 @@ namespace Cielonos
|
||||
|
||||
// 3. 未找到
|
||||
Debug.LogWarning($"PostProcessManager: 在 Volume Profile 中未找到类型为 {type.Name} 的组件。");
|
||||
component = null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user