File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ public Misc(UIBase owner) : base(owner)
4848 Toggle HighLodToggle ;
4949 object qualitySettings = null ;
5050 PropertyInfo lodBias = null ;
51+ float _defaultLodBias = 1 ;
5152
5253 // We save the current properties of the Renderers and Lights to restore them after editing them with togglers
5354 internal Dictionary < Renderer , bool > renderersReceiveShadows = new ( ) ;
@@ -122,9 +123,9 @@ private void ToogleHighLods(bool areHighLodsOn){
122123 if ( lodBias == null ) {
123124 Type qualitySettingsType = qualitySettings is Type type ? type : qualitySettings . GetActualType ( ) ;
124125 lodBias = qualitySettingsType . GetProperty ( "lodBias" ) ;
126+ _defaultLodBias = ( float ) lodBias . GetValue ( null ) ;
125127 }
126-
127- lodBias . SetValue ( null , areHighLodsOn ? 10000 : 1 , null ) ;
128+ lodBias . SetValue ( null , areHighLodsOn ? 10000 : _defaultLodBias , null ) ;
128129 }
129130
130131 private void ToggleAllMeshesCastAndRecieveShadows ( bool enable ) {
You can’t perform that action at this time.
0 commit comments