public void OnTargetFrameRateBtnClick(bool is30Rate) { this._modifiedPersonalSetting.IsUserDefinedGrade = false; this._modifiedPersonalSetting.IsUserDefinedVolatile = true; if (is30Rate) { this._modifiedPersonalSetting.TargetFrameRate = 30; } else { this._modifiedPersonalSetting.TargetFrameRate = 60; } GraphicsSettingUtil.SetTargetFrameRate(this._modifiedPersonalSetting.TargetFrameRate); this.ShowTargetFrameRate(this._modifiedPersonalSetting.TargetFrameRate, false); }
public static void ApplySettingConfig(ConfigGraphicsSetting setting) { GraphicsSettingUtil.SetTargetFrameRate(setting.TargetFrameRate); bool forceWhenDisable = true; GraphicsSettingUtil.EnablePostFX(setting.VolatileSetting.UsePostFX, forceWhenDisable); GraphicsSettingUtil.ApplyResolution(setting.ResolutionPercentage, setting.ResolutionQuality, setting.RecommendResolutionX, setting.RecommendResolutionY); GraphicsSettingUtil.SetPostEffectBufferSizeByQuality(setting.PostFxGradeBufferSize, setting.VolatileSetting.PostFXGrade); GraphicsSettingUtil.EnableHDR(setting.VolatileSetting.UseHDR); GraphicsSettingUtil.EnableDistortion(setting.VolatileSetting.UseDistortion); GraphicsSettingUtil.EnableReflection(setting.VolatileSetting.UseReflection); GraphicsSettingUtil.EnableFXAA(setting.VolatileSetting.UseFXAA); GraphicsSettingUtil.EnableDynamicBone(setting.VolatileSetting.UseDynamicBone); GraphicsSettingUtil.EnableStaticCloudMode(!setting.VolatileSetting.UseDynamicBone); }
public void Awake() { GraphicsSettingUtil.SetTargetFrameRate(60); GeneralLogicManager.InitOnGameStart(); Singleton <MainUIManager> .Instance.SetMainCanvas(this); this.assetbundleRetryTimes = 0; this._status = Status.Default; this._retryAssetBundleWaitTimer = 0f; this._videoPlayer = base.transform.Find("Video/VideoPlayer").GetComponent <MediaPlayer>(); this._videoPlayer.Events.AddListener(new UnityAction <MediaPlayer, MediaPlayerEvent.EventType, ErrorCode>(this.OnVideoEvent)); this._videoPlayer.gameObject.SetActive(false); this._videoDisplay = base.transform.Find("Video/VideoDisplay").GetComponent <DisplayIMGUI>(); this._videoDisplay.gameObject.SetActive(false); base.transform.Find("Video/BlackPanel").gameObject.SetActive(false); base.transform.Find("Video").gameObject.SetActive(false); }