From 15db25c0b821c8e76c1a3de5e3e627eda7bd5e94 Mon Sep 17 00:00:00 2001 From: Areloch Date: Wed, 26 Oct 2016 00:51:05 -0500 Subject: [PATCH] Fixes minor issue where if a prefab was in one of the root directories rather than further in the heirarchy, it would incorrectly add a folder of the prefab's name that contains the prefab in the creator menu's prefabs tab. --- .../Empty/game/tools/worldEditor/scripts/editors/creator.ed.cs | 2 +- .../Full/game/tools/worldEditor/scripts/editors/creator.ed.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Templates/Empty/game/tools/worldEditor/scripts/editors/creator.ed.cs b/Templates/Empty/game/tools/worldEditor/scripts/editors/creator.ed.cs index 9dbfb91bb..0e2813d57 100644 --- a/Templates/Empty/game/tools/worldEditor/scripts/editors/creator.ed.cs +++ b/Templates/Empty/game/tools/worldEditor/scripts/editors/creator.ed.cs @@ -486,7 +486,7 @@ function EWCreatorWindow::navigate( %this, %address ) } // Is this file in the current folder? - if ( stricmp( %pathFolders, %address ) == 0 ) + if ( (%dirCount == 0 && %address $= "") || stricmp( %pathFolders, %address ) == 0 ) { %this.addPrefabIcon( %fullPath ); } diff --git a/Templates/Full/game/tools/worldEditor/scripts/editors/creator.ed.cs b/Templates/Full/game/tools/worldEditor/scripts/editors/creator.ed.cs index 9dbfb91bb..0e2813d57 100644 --- a/Templates/Full/game/tools/worldEditor/scripts/editors/creator.ed.cs +++ b/Templates/Full/game/tools/worldEditor/scripts/editors/creator.ed.cs @@ -486,7 +486,7 @@ function EWCreatorWindow::navigate( %this, %address ) } // Is this file in the current folder? - if ( stricmp( %pathFolders, %address ) == 0 ) + if ( (%dirCount == 0 && %address $= "") || stricmp( %pathFolders, %address ) == 0 ) { %this.addPrefabIcon( %fullPath ); }