回答編集履歴

1

ビルド後の場合に発生する不具合に対処するための修正を追加

2019/10/21 22:49

投稿

Bongo
Bongo

スコア10807

test CHANGED
@@ -284,6 +284,24 @@
284
284
 
285
285
  GL.PushMatrix();
286
286
 
287
+
288
+
289
+ // プレイモードだとCamera.currentはnullだが、ビルド後の場合はnullではなくDrawMeshNowの時に
290
+
291
+ // 余計な影響を及ぼしてくるようだったため、Camera.currentのビュー行列を無効化して干渉を防ぐ
292
+
293
+ var currentCamera = Camera.current;
294
+
295
+ if (currentCamera != null)
296
+
297
+ {
298
+
299
+ currentCamera.worldToCameraMatrix = Matrix4x4.identity;
300
+
301
+ }
302
+
303
+
304
+
287
305
  GL.LoadProjectionMatrix(pixelMatrix * this.mainCamera.projectionMatrix);
288
306
 
289
307
 
@@ -312,6 +330,16 @@
312
330
 
313
331
 
314
332
 
333
+ if (currentCamera != null)
334
+
335
+ {
336
+
337
+ currentCamera.ResetWorldToCameraMatrix();
338
+
339
+ }
340
+
341
+
342
+
315
343
  GL.PopMatrix();
316
344
 
317
345