@@ -117,14 +117,18 @@ void ConsumeEnumerator(IEnumerator routine)
117
117
}
118
118
119
119
var type = current . GetType ( ) ;
120
- #pragma warning disable CS0618
120
+ #if UNITY_2018_3_OR_NEWER
121
+ #pragma warning disable CS0618
122
+ #endif
121
123
if ( type == typeof ( WWW ) )
122
124
{
123
125
var www = ( WWW ) current ;
124
126
editorQueueWorker . Enqueue ( _ => ConsumeEnumerator ( UnwrapWaitWWW ( www , routine ) ) , null ) ;
125
127
return ;
126
128
}
127
- #pragma warning restore CS0618
129
+ #if UNITY_2018_3_OR_NEWER
130
+ #pragma warning restore CS0618
131
+ #endif
128
132
else if ( type = = typeof ( AsyncOperation ) )
129
133
{
130
134
var asyncOperation = ( AsyncOperation ) current ;
@@ -158,7 +162,9 @@ void ConsumeEnumerator(IEnumerator routine)
158
162
}
159
163
}
160
164
161
- #pragma warning disable CS0618
165
+ #if UNITY_2018_3_OR_NEWER
166
+ #pragma warning disable CS0618
167
+ #endif
162
168
IEnumerator UnwrapWaitWWW ( WWW www , IEnumerator continuation )
163
169
{
164
170
while ( ! www . isDone )
@@ -167,7 +173,9 @@ IEnumerator UnwrapWaitWWW(WWW www, IEnumerator continuation)
167
173
}
168
174
ConsumeEnumerator ( continuation ) ;
169
175
}
170
- #pragma warning restore CS0618
176
+ #if UNITY_2018_3_OR_NEWER
177
+ #pragma warning restore CS0618
178
+ #endif
171
179
172
180
IEnumerator UnwrapWaitAsyncOperation ( AsyncOperation asyncOperation , IEnumerator continuation )
173
181
{
0 commit comments