반응형
SelectionManager에서 설정을 받아서 MainCameraManager에서 구현

SelectionManager.cs
[SerializeField]
private CameraFollow camFollow = new CameraFollow { enabled = true, key = KeyCode.Space, iterate = true };
CameraController.cs

public void SetFollowTarget (Transform transform) {
followTarget = transform;
//reset movement inputs
currPanDirection = Vector3.zero;
lastPanDirection = Vector3.zero;
}
반응형
'Unity > Asset 분석' 카테고리의 다른 글
| [RTS Engine] 코드로 Unit 움직이기 (0) | 2021.07.15 |
|---|---|
| [RTS Engine] CustomEvents (0) | 2021.07.15 |
| [RTS Engine] Scene을 통째로 복붙했는데 느려질 때 (0) | 2021.07.14 |
| [RTS Engine] 초기 카메라의 위치 (0) | 2021.07.06 |
| [Easy Road 3D Pro] 도로 연결하기 (0) | 2021.07.04 |