namespace UnityEngine.AdaptivePerformance.Samsung.Android { /// /// Event handler declaration. /// public delegate void VariableRefreshRateEventHandler(); /// /// Interface of the Samsung Variable Refresh Rate API. /// public interface IVariableRefreshRate { /// /// List of supported display refresh rates. /// int[] SupportedRefreshRates { get; } /// /// The current display refresh rate. /// int CurrentRefreshRate { get; } /// /// Change the current display refresh rate to the value referenced by the given index from the list of supported refresh rates. /// /// /// True if the display refresh rate was updated successfully, false otherwise. Returns false if the requested refresh rate is larger than the `Application.targetFrameRate`. **Note:** There is a delay before the actual refresh rate and the value of `Screen.currentResolution.refreshRate` are updated. bool SetRefreshRateByIndex(int index); /// /// Event that is called if the current display refresh rate or the list of supported refresh rate is changed externally, for example by changing display settings. /// event VariableRefreshRateEventHandler RefreshRateChanged; } /// /// Holds the global instance to the Variable Refresh Rate API. /// public static class VariableRefreshRate { /// /// Global instance to access the variable refresh API. /// Can be null if variable refresh rate is not supported. /// static public IVariableRefreshRate Instance { get; set; } } }