/// <summary>
                /// Create an initialized version of this struct.
                /// </summary>
                /// <returns>An initialized version of this struct.</returns>
                public static SettingsNative Create()
                {
                    if (!defaultSettings.HasValue)
                    {
                        SettingsNative settings = new SettingsNative()
                        {
                            Version                      = 1u,
                            SwayHistorySize              = 0u,
                            MaxDeltaAngle                = 0.0f,
                            ControlDampeningFactor       = 0.0f,
                            MaxSwayAngle                 = 0.0f,
                            MaximumHeadposeRotationSpeed = 0.0f,
                            MaximumHeadposeMovementSpeed = 0.0f,
                            MaximumDepthDeltaForSway     = 0.0f,
                            MinimumDistance              = 0.0f,
                            MaximumDistance              = 0.0f,
                            MaximumSwayTimeSeconds       = 0.0f,
                            EndResolveTimeoutSeconds     = 0.0f,
                        };

                        try
                        {
                            MLResult.Code result = NativeBindings.MLMovementGetDefaultSettings(out settings);
                            if (result != MLResult.Code.Ok)
                            {
                                MLPluginLog.ErrorFormat("MLMovement.NativeBindings.SettingsNative.Create failed to get default movement settings. Reason: {0}", result);
                            }
                        }
                        catch (System.DllNotFoundException)
                        {
                            MLPluginLog.Error("MLMovement API is currently available only on device.");
                        }
                        catch (System.EntryPointNotFoundException)
                        {
                            MLPluginLog.Error("MLMovement API symbols not found");
                        }

                        defaultSettings = settings;
                    }

                    return(defaultSettings.Value);
                }
 public static extern MLResult.Code MLMovementGetDefaultSettings(out SettingsNative settings);