@@ -38,8 +38,6 @@ public class BokehEditor : Editor
38
38
SerializedProperty _kernelSize ;
39
39
SerializedProperty _visualize ;
40
40
41
- bool _warnOddNumber ;
42
-
43
41
static GUIContent _labelPointOfFocus = new GUIContent (
44
42
"Point Of Focus" ,
45
43
"Transform that represents the point of focus."
@@ -75,14 +73,6 @@ public class BokehEditor : Editor
75
73
"Visualize the depths as red (focused), green (far) or blue (near)."
76
74
) ;
77
75
78
- static string _textOddNumberWarning = "Odd number screen width or height may introduce artifacts." ;
79
-
80
- bool CheckOddNumber ( )
81
- {
82
- var camera = ( ( Component ) target ) . GetComponent < Camera > ( ) ;
83
- return ( camera . pixelWidth & 1 ) != 0 || ( camera . pixelHeight & 1 ) != 0 ;
84
- }
85
-
86
76
void OnEnable ( )
87
77
{
88
78
_pointOfFocus = serializedObject . FindProperty ( "_pointOfFocus" ) ;
@@ -92,23 +82,6 @@ void OnEnable()
92
82
_focalLength = serializedObject . FindProperty ( "_focalLength" ) ;
93
83
_kernelSize = serializedObject . FindProperty ( "_kernelSize" ) ;
94
84
_visualize = serializedObject . FindProperty ( "_visualize" ) ;
95
- _warnOddNumber = CheckOddNumber ( ) ;
96
- EditorApplication . update += Update ;
97
- }
98
-
99
- void OnDisable ( )
100
- {
101
- EditorApplication . update -= Update ;
102
- }
103
-
104
- void Update ( )
105
- {
106
- var oddNumberFlag = CheckOddNumber ( ) ;
107
- if ( _warnOddNumber != oddNumberFlag )
108
- {
109
- _warnOddNumber = oddNumberFlag ;
110
- Repaint ( ) ;
111
- }
112
85
}
113
86
114
87
public override void OnInspectorGUI ( )
@@ -154,10 +127,6 @@ public override void OnInspectorGUI()
154
127
// Visualize
155
128
EditorGUILayout . PropertyField ( _visualize , _labelVisualize ) ;
156
129
157
- // Odd number screen width/height warning
158
- if ( _warnOddNumber )
159
- EditorGUILayout . HelpBox ( _textOddNumberWarning , MessageType . Warning ) ;
160
-
161
130
serializedObject . ApplyModifiedProperties ( ) ;
162
131
}
163
132
}
0 commit comments