File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,24 +24,9 @@ public partial class Plugin : MVRScript
2424 public override void Init ( )
2525 {
2626 base . Init ( ) ;
27-
2827 UIManager . Initialize ( this ) ;
2928
3029 _recorder = new BinaryDeviceRecorder ( ) ;
31-
32- try
33- {
34- try
35- {
36- var defaultPath = Array . Find ( FileManagerSecure . GetFiles ( PluginDir , "*.json" ) , s => s . EndsWith ( "default.json" ) ) ;
37- if ( defaultPath != null )
38- ConfigManager . LoadConfig ( defaultPath , this ) ;
39- } catch { }
40- }
41- catch ( Exception e )
42- {
43- SuperController . LogError ( "Exception caught: " + e ) ;
44- }
4530 }
4631
4732 public override void InitUI ( )
@@ -53,12 +38,14 @@ public override void InitUI()
5338 try
5439 {
5540 CreateUI ( ) ;
56- _initialized = true ;
41+ ConfigManager . LoadConfig ( $@ " { PluginDir } \default.json" , this ) ;
5742 }
5843 catch ( Exception e )
5944 {
6045 SuperController . LogError ( "Exception caught: " + e ) ;
6146 }
47+
48+ _initialized = true ;
6249 }
6350
6451 protected void Update ( )
You can’t perform that action at this time.
0 commit comments