The GetInt
method retrieves an integer value from the render settings based on a specified key. If the key does not exist, it returns a default value provided by the caller.
The GetInt
method retrieves an integer value from the render settings based on a specified key. If the key does not exist, it returns a default value provided by the caller.
Use the GetInt
method when you need to access integer configuration values from the render settings. This method is useful for retrieving settings such as resolution dimensions, frame rates, or other integer-based configurations.
RenderSettings renderSettings = new RenderSettings(); int resolutionWidth = renderSettings.GetInt("ResolutionWidth", 1920); int maxFrameRate = renderSettings.GetInt("MaxFrameRate", 60); // Use the retrieved settings Console.WriteLine($"Resolution Width: {resolutionWidth}"); Console.WriteLine($"Max Frame Rate: {maxFrameRate}");