1- using Unity . Cinemachine ;
21using System ;
32using System . Collections ;
43using System . Collections . Generic ;
@@ -18,10 +17,7 @@ public class PerformanceTestStage
1817
1918 [ FormerlySerializedAs ( "SceneName" ) ]
2019 public string sceneName ;
21-
22- // TODO: Remove followings
23- public Vector3 cameraPosition ;
24- public Quaternion cameraRotation ;
20+
2521 public bool useFullTimeline = true ;
2622 // ENDTODO
2723
@@ -30,7 +26,6 @@ public class PerformanceTestStage
3026
3127 private int _recordingIndex = 0 ;
3228
33- private Camera _testCamera => PerformanceTest . instance . testCamera ;
3429 private Action _finishedAction ;
3530 private PlayableDirector _playableDirector ;
3631 private float _intermediateCaptureTime ;
@@ -251,10 +246,6 @@ IEnumerator LoadAndInit()
251246 status = TestStageStatus . Warming ;
252247 _cancelButton . text = "Stop" ;
253248
254- // Debug.Log($"Start test {sceneName}");
255-
256- _testCamera . transform . position = cameraPosition ;
257- _testCamera . transform . rotation = cameraRotation ;
258249
259250 // Debug.Log($"Load Scene {sceneName}");
260251
@@ -266,9 +257,7 @@ IEnumerator LoadAndInit()
266257
267258 yield return null ;
268259 PerformanceTest . instance . RefreshEventSystem ( ) ;
269-
270- DisableCamerasInScene ( ) ;
271-
260+
272261 var directors = Resources . FindObjectsOfTypeAll < PlayableDirector > ( ) ;
273262
274263 // Debug.Log($"Found {directors.Length} playable director(s) in the scene {SceneManager.GetActiveScene().name}");
@@ -281,13 +270,7 @@ IEnumerator LoadAndInit()
281270 if ( _playableDirector != null )
282271 {
283272 _playableDirector . gameObject . SetActive ( true ) ;
284- var playable = _playableDirector . playableAsset ;
285- if ( playable . outputs . Any ( o => o . outputTargetType == typeof ( CinemachineBrain ) ) )
286- {
287- var cinemachineTrack = playable . outputs . Single ( o => o . outputTargetType == typeof ( CinemachineBrain ) ) . sourceObject ;
288- _playableDirector . SetGenericBinding ( cinemachineTrack , _testCamera . GetComponent < CinemachineBrain > ( ) ) ;
289- }
290-
273+
291274 var duration = ( float ) _playableDirector . duration ;
292275 _intermediateCaptureTime = duration / ( PerformanceTest . instance . _framesToCapture + 1 ) ;
293276
@@ -431,18 +414,6 @@ void Cancel()
431414 _cancelButton . clicked -= Cancel ;
432415 }
433416
434- private void DisableCamerasInScene ( )
435- {
436- foreach ( var camera in UnityEngine . Object . FindObjectsByType < Camera > ( FindObjectsSortMode . None ) )
437- {
438- // Debug.Log("Found camera: " + camera.gameObject.name);
439- if ( camera . gameObject != _testCamera . gameObject )
440- {
441- camera . enabled = false ;
442- }
443- }
444- }
445-
446417 public void RefreshDisplayedData ( )
447418 {
448419 if
0 commit comments