DataEditor & StorySystem Graph
This commit is contained in:
@@ -74,15 +74,22 @@ namespace Continentis.MainGame.Equipment
|
||||
if (_haveCustomClassProp.boolValue)
|
||||
{
|
||||
// 如果勾选,则显示class选择器 (假设基类为EquipmentBase, 命名空间为.Equipments)
|
||||
if (DrawTypeSelectorGUI(_classNameProp, "Equipment Class", typeof(EquipmentBase), out Type outType, "Continentis.Mods", ".Equipments"))
|
||||
{
|
||||
string className = _classNameProp.stringValue;
|
||||
string modName = outType.Namespace!.Replace("Continentis.Mods.", "").Split('.')[0];
|
||||
string displayName = "Card_" + modName + "_" + className + "_DisplayName";
|
||||
|
||||
_modNameProp.stringValue = modName;
|
||||
_displayNameProp.stringValue = displayName;
|
||||
}
|
||||
DrawSearchableTypeSelector(
|
||||
_classNameProp,
|
||||
"Equipment Class",
|
||||
typeof(EquipmentBase),
|
||||
(outType) =>
|
||||
{
|
||||
string className = outType.Name;
|
||||
string modName = outType.Namespace!.Replace("Continentis.Mods.", "").Split('.')[0];
|
||||
string displayName = "Card_" + modName + "_" + className + "_DisplayName";
|
||||
|
||||
_classNameProp.stringValue = className;
|
||||
_modNameProp.stringValue = modName;
|
||||
_displayNameProp.stringValue = displayName;
|
||||
},
|
||||
"Continentis.Mods",
|
||||
"Equipments");
|
||||
|
||||
EditorGUI.BeginDisabledGroup(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user