File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Assets/MapEditor/Managers Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,18 @@ public static void Initialise(string bundlesRoot)
2626 {
2727 if ( ! IsInitialised )
2828 {
29+ if ( ! Directory . Exists ( SettingsManager . RustDirectory ) )
30+ {
31+ Debug . LogError ( "Directory does not exist: " + bundlesRoot ) ;
32+ return ;
33+ }
34+
35+ if ( ! SettingsManager . RustDirectory . EndsWith ( "Rust" ) )
36+ {
37+ Debug . LogError ( "Not a valid Rust install directory: " + SettingsManager . RustDirectory ) ;
38+ return ;
39+ }
40+
2941 ProgressBarManager . Display ( "Loading Bundles" , "Loading Root Bundle" , 0.1f ) ;
3042 BundlePath = bundlesRoot ;
3143 var rootBundle = AssetBundle . LoadFromFile ( bundlesRoot ) ;
@@ -36,7 +48,6 @@ public static void Initialise(string bundlesRoot)
3648 }
3749
3850 var manifestList = rootBundle . LoadAllAssets < AssetBundleManifest > ( ) ;
39-
4051 if ( manifestList . Length != 1 )
4152 {
4253 Debug . LogError ( "Couldn't find AssetBundleManifest - " + manifestList . Length ) ;
You can’t perform that action at this time.
0 commit comments