File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
com.unity.netcode.gameobjects/Runtime/Configuration Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -11,17 +11,32 @@ namespace Unity.Netcode
1111 public class CommandLineOptions
1212 {
1313 /// <summary>
14- /// Command Line Options Singleton
14+ /// Command-line options singleton
1515 /// </summary>
16- public static CommandLineOptions Instance { get ; private set ; } = null ! ;
16+ public static CommandLineOptions Instance
17+ {
18+ get
19+ {
20+ if ( s_Instance == null )
21+ {
22+ s_Instance = new CommandLineOptions ( ) ;
23+ }
24+ return s_Instance ;
25+ }
26+ private set
27+ {
28+ s_Instance = value ;
29+ }
30+ }
31+ private static CommandLineOptions s_Instance ;
1732
1833 [ RuntimeInitializeOnLoadMethod ( RuntimeInitializeLoadType . SubsystemRegistration ) ]
1934 private static void RuntimeInitializeOnLoad ( ) => Instance = new CommandLineOptions ( ) ;
2035
2136 // Contains the current application instance domain's command line arguments
2237 internal static List < string > CommandLineArguments = new List < string > ( ) ;
2338
24- // Invoked upon application start
39+ // Invoked upon application start, after scene load
2540 [ RuntimeInitializeOnLoadMethod ]
2641 private static void ParseCommandLineArguments ( )
2742 {
You can’t perform that action at this time.
0 commit comments