继续
This commit is contained in:
@@ -150,7 +150,7 @@ namespace SLSFramework.UModAssistance
|
||||
/// <param name="namespaceToRemove">可选参数,用于从路径中移除特定的命名空间部分 (例如 ".Cards")</param>
|
||||
/// <returns>如果值被用户改变,则返回true</returns>
|
||||
protected bool DrawTypeSelectorGUI(SerializedProperty classNameProp, string label, Type baseType,
|
||||
string namespacePrefix = null, string namespaceToRemove = null)
|
||||
out Type returnedType, string namespacePrefix = null, string namespaceToRemove = null)
|
||||
{
|
||||
// --- 核心修改 2:使用包含 namespaceToRemove 的复合键 ---
|
||||
var cacheKey = new Tuple<Type, string>(baseType, namespaceToRemove ?? string.Empty);
|
||||
@@ -179,9 +179,12 @@ namespace SLSFramework.UModAssistance
|
||||
classNameProp.stringValue = (newIndex >= 0 && newIndex < types.Length)
|
||||
? types[newIndex].Name
|
||||
: string.Empty;
|
||||
|
||||
returnedType = types[newIndex];
|
||||
return true;
|
||||
}
|
||||
|
||||
returnedType = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user