Skip to content

Commit

Permalink
Clean up import window initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Varneon committed Jan 14, 2024
1 parent 186476b commit c772948
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ namespace Varneon.BlenderFBXImporter
/// </summary>
internal class ImportWindow : EditorWindow
{
[SerializeField]
private Texture2D windowIcon;

List<FBXAsset> models = new List<FBXAsset>();

ImportParameters importParameters = new ImportParameters(1f, true);
Expand Down Expand Up @@ -83,14 +86,15 @@ private static bool DoesSelectionContainFBXAssets()
[MenuItem(MenuPath, false)]
private static void OpenImportPrompt()
{
ImportWindow window = GetWindow<ImportWindow>();
window.titleContent = new GUIContent("Blender FBX Importer", Resources.Load<Texture2D>("Icon_BlenderFBXImporter"));
window.minSize = MinWindowSize;
window.Show();
GetWindow<ImportWindow>();
}

private void OnEnable()
{
titleContent = new GUIContent("Blender FBX Importer", windowIcon);

minSize = MinWindowSize;

models.AddRange(GetSelectedFBXAssetPaths().Select(c => new FBXAsset(c)));

TryAddModelPathFunc = path => TryAddModelPath(path);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c772948

Please sign in to comment.