SW 중심대학 OSS GIT 서버 박건태, 이승준, 고기완, 이준호 새로운 배포
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

37 lines
1.1 KiB

/*
------------------- Code Monkey -------------------
Thank you for downloading the Code Monkey Utilities
I hope you find them useful in your projects
If you have any questions use the contact form
Cheers!
unitycodemonkey.com
--------------------------------------------------
*/
using System.Collections.Generic;
using UnityEngine;
namespace CodeMonkey.MonoBehaviours {
/*
* Easy set up for CameraFollow, it will follow the transform with zoom
* */
public class CameraFollowSetup : MonoBehaviour {
[SerializeField] private CameraFollow cameraFollow;
[SerializeField] private Transform followTransform;
[SerializeField] private float zoom;
private void Start() {
if (followTransform == null) {
Debug.LogError("followTransform is null! Intended?");
cameraFollow.Setup(() => Vector3.zero, () => zoom);
} else {
cameraFollow.Setup(() => followTransform.position, () => zoom);
}
}
}
}