Exemple #1
0
        /// <summary>Initializes StereoKit window, default resources, systems,
        /// etc.</summary>
        /// <param name="settings">The configuration settings for StereoKit.
        /// This defines how StereoKit starts up and behaves, so it contains
        /// things like app name, assets folder, display mode, etc. The
        /// default settings are meant to be good for most, but you may want
        /// to modify at least a few of these eventually!</param>
        /// <returns>Returns true if all systems are successfully
        /// initialized!</returns>
        public static bool Initialize(SKSettings settings)
        {
            if (!NativeLib.Load())
            {
                global::System.Diagnostics.Debug.WriteLine("[SK error] Failed to load StereoKitC!");
                Console.WriteLine("[SK error] Failed to load StereoKitC!");
                return(false);
            }

            IsInitialized = InitializeCall(settings);
            return(IsInitialized);
        }
Exemple #2
0
 /// <summary>If you subscribed to the log callback, you can
 /// unsubscribe that callback here!
 /// This method can safely be called before initialization.</summary>
 /// <param name="onLog">The subscribed callback to remove.</param>
 public static void Unsubscribe(LogCallback onLog)
 {
     NativeLib.Load();
     _Unsubscribe(onLog);
 }
Exemple #3
0
 /// <summary>If you need to call StereoKit code before calling
 /// SK.Initialize, you may need to explicitly load the library first.
 /// This can be useful for setting up a few things, but should
 /// probably be a pretty rare case.</summary>
 public static void PreLoadLibrary()
 => NativeLib.Load();