Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

fix GameObject export issue #53

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions AssetStudio.GUI/Exporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,13 @@ public static bool ExportAnimator(AssetItem item, string exportPath, List<AssetI
return true;
}

public static bool ExportGameObject(AssetItem item, string exportPath, List <AssetItem> animationList = null)
public static bool ExportGameObject(AssetItem item, string exportPath, List<AssetItem> animationList = null)
{
var exportFullPath = Path.Combine(exportPath, item.Text, item.Text + ".fbx");
if (File.Exists(exportFullPath))
item.Text = FixFileName(item.Text);
var exportFullPath = Path.Combine(exportPath, item.Text) + Path.DirectorySeparatorChar;
if (Directory.Exists(exportFullPath))
{
exportFullPath = Path.Combine(exportPath, item.Text + item.UniqueID, item.Text + ".fbx");
exportFullPath = Path.Combine(exportPath, item.Text + item.UniqueID) + Path.DirectorySeparatorChar;
}
var m_GameObject = (GameObject)item.Asset;
ExportGameObject(m_GameObject, exportFullPath, animationList);
Expand Down