File tree 2 files changed +12
-8
lines changed
2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -382,9 +382,9 @@ def validate_uproject(self, urpoject):
382
382
def display_unreal_info (self ):
383
383
'''display engine and selected uproject info'''
384
384
if hasattr (self , 'unreal_full_version' ) and hasattr (self , 'unreal_dir' ):
385
- logging .info (f'Found Unreal engine { self .unreal_full_version } in { self .unreal_dir } ' )
385
+ logging .info (f'Found Unreal Engine { self .unreal_full_version } in { self .unreal_dir } ' )
386
386
else :
387
- logging .info ('No Unreal engine loaded ' )
387
+ logging .info ('No Unreal Engine found ' )
388
388
if hasattr (self , 'uproject' ) and hasattr (self , 'uproject_dir' ):
389
389
logging .info (f'Found Unreal project { self .uproject } in { self .uproject_dir } ' )
390
390
else :
Original file line number Diff line number Diff line change @@ -48,13 +48,17 @@ def load_config(env):
48
48
unreal_base_paths = [
49
49
'UE' ,
50
50
'UE4' ,
51
- '' ,
51
+ '. ' ,
52
52
]
53
- for unreal_path in unreal_base_paths :
54
- unreal_dir = nimp .system .find_dir_containing_file (os .path .join (unreal_path , unreal_file ))
55
- if unreal_dir :
56
- unreal_dir = os .path .join (unreal_dir , unreal_path )
57
- break
53
+ for base in unreal_base_paths :
54
+ path_to_base = nimp .system .find_dir_containing_file (os .path .join (base , unreal_file ))
55
+ if not path_to_base :
56
+ continue
57
+ # Sanity check: if `base` indicates a monorepo setup, check that it is really one
58
+ if base != '.' and not os .path .isfile (os .path .join (path_to_base , '.nimp/monorepo_commands/__init__.py' )):
59
+ continue
60
+ unreal_dir = os .path .join (path_to_base , base )
61
+ break
58
62
59
63
if not unreal_dir :
60
64
env .is_unreal = env .is_ue4 = env .is_ue5 = False
You can’t perform that action at this time.
0 commit comments