Refactor and clean up game assets and editor modules
- Deleted unused weapon and enemy stat assets to streamline project. - Updated player form assets to reference new default weapon IDs. - Enhanced DataHub editor UI for better usability, including improved tab management and detail views. - Removed icon references in various editor modules to simplify the interface. - Added new boss skill assets and corresponding metadata for future development. - Created new folders and metadata for organizing boss-related assets, skills, and stats. - Implemented a new skill asset with updated properties for better gameplay mechanics.
This commit is contained in:
@@ -100,15 +100,19 @@ namespace BaseGames.Editor
|
||||
split.style.flexGrow = 1;
|
||||
root.Add(split);
|
||||
|
||||
// 列表区容器
|
||||
// 列表区容器(TwoPaneSplitView 管理宽度,不需要 flexGrow)
|
||||
_listWrapper = new VisualElement();
|
||||
_listWrapper.style.flexGrow = 1;
|
||||
_listWrapper.style.flexGrow = 1;
|
||||
_listWrapper.style.overflow = Overflow.Hidden;
|
||||
split.Add(_listWrapper);
|
||||
|
||||
// 详情区容器
|
||||
_detailWrapper = new VisualElement();
|
||||
_detailWrapper.style.flexGrow = 1;
|
||||
split.Add(_detailWrapper);
|
||||
// 详情区容器(ScrollView 支持超长内容滚动)
|
||||
var detailScroll = new ScrollView(ScrollViewMode.Vertical);
|
||||
detailScroll.style.flexGrow = 1;
|
||||
detailScroll.contentContainer.style.flexGrow = 1;
|
||||
detailScroll.contentContainer.style.flexDirection = FlexDirection.Column;
|
||||
split.Add(detailScroll);
|
||||
_detailWrapper = detailScroll.contentContainer;
|
||||
}
|
||||
|
||||
private VisualElement BuildNavSidebar()
|
||||
@@ -163,14 +167,18 @@ namespace BaseGames.Editor
|
||||
btn.style.backgroundColor = new StyleColor(Color.clear);
|
||||
btn.style.marginBottom = 2;
|
||||
|
||||
// 图标
|
||||
// 图标(容错:图标名无效时跳过,不报错)
|
||||
if (!string.IsNullOrEmpty(module.IconName))
|
||||
{
|
||||
var icon = new Image { image = EditorGUIUtility.IconContent(module.IconName).image };
|
||||
icon.style.width = 16;
|
||||
icon.style.height = 16;
|
||||
icon.style.marginRight = 6;
|
||||
btn.Add(icon);
|
||||
var content = EditorGUIUtility.IconContent(module.IconName);
|
||||
if (content?.image != null)
|
||||
{
|
||||
var icon = new Image { image = content.image };
|
||||
icon.style.width = 16;
|
||||
icon.style.height = 16;
|
||||
icon.style.marginRight = 6;
|
||||
btn.Add(icon);
|
||||
}
|
||||
}
|
||||
|
||||
var label = new Label(module.DisplayName);
|
||||
|
||||
Reference in New Issue
Block a user