@@ -38,6 +38,10 @@ sealed class PostProcessLayerEditor : BaseEditor<PostProcessLayer>
38
38
39
39
Dictionary < PostProcessEvent , ReorderableList > m_CustomLists ;
40
40
41
+ #if UNITY_2017_3_OR_NEWER
42
+ Camera m_TargetCameraComponent ;
43
+ #endif
44
+
41
45
static GUIContent [ ] s_AntialiasingMethodNames =
42
46
{
43
47
new GUIContent ( "No Anti-aliasing" ) ,
@@ -75,6 +79,10 @@ void OnEnable()
75
79
76
80
m_ShowToolkit = serializedObject . FindProperty ( "m_ShowToolkit" ) ;
77
81
m_ShowCustomSorter = serializedObject . FindProperty ( "m_ShowCustomSorter" ) ;
82
+
83
+ #if UNITY_2017_3_OR_NEWER
84
+ m_TargetCameraComponent = m_Target . GetComponent < Camera > ( ) ;
85
+ #endif
78
86
}
79
87
80
88
void OnDisable ( )
@@ -162,9 +170,10 @@ void DoAntialiasing()
162
170
if ( RuntimeUtilities . isSinglePassStereoSelected )
163
171
EditorGUILayout . HelpBox ( "TAA requires Unity 2017.3+ for Single-pass stereo rendering support." , MessageType . Warning ) ;
164
172
#endif
165
- var camera = m_Target . GetComponent < Camera > ( ) ;
166
- if ( camera . allowDynamicResolution )
173
+ #if UNITY_2017_3_OR_NEWER
174
+ if ( m_TargetCameraComponent != null && m_TargetCameraComponent . allowDynamicResolution )
167
175
EditorGUILayout . HelpBox ( "TAA is not supported with Dynamic Resolution." , MessageType . Warning ) ;
176
+ #endif
168
177
169
178
EditorGUILayout . PropertyField ( m_TaaJitterSpread ) ;
170
179
EditorGUILayout . PropertyField ( m_TaaStationaryBlending ) ;
0 commit comments