vcam.m_Lens.OrthographicSize = bla;
VirtualMainCamera.m_Lens.OrthographicSize = 5f;
'GameObject' does not contain a definition for 'm_Lens'
VirtualMainCamera.transform.position += DifferencePositionCamera;
GameObject VirtualMainCamera;
.............
if(Input.GetMouseButtonDown(0)){
CurrentPositionCamera = MainCamera.ScreenToWorldPoint(Input.mousePosition);
}
if(Input.GetMouseButton(0)){
Vector3 DiffCamera = CurrentCamera - MainCamera.ScreenToWorldPoint(Input.mousePosition);
if(DiffCamera != PrevCamera){
VirtualMainCamera.transform.position += DifferencePositionCamera;
PrevCamera= DiffCamera ;
}
[Package Manager Window] Error searching for packages.
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
[Package Manager Window] Cannot perform upm operation: Cannot fetch authorization code. User access token is expired or user is not logged in. [Forbidden].
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
[Package Manager Window] Cannot fetch authorization code. User access token is expired or user is not logged in.
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
[Package Manager Window] Error searching for packages offline.
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
[Package Manager Window] Error searching for packages.
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
if(ObjectCellTarget != null){
agent = GetComponent<NavMeshAgent>();
agent.updateRotation = false;
agent.updateUpAxis = false;
agent.SetDestination(ObjectCellTarget);
}
if(ObjectCellTarget != null){
agent = GetComponent<NavMeshAgent>();
agent.updateRotation = false;
agent.updateUpAxis = false;
NavMeshPath path = new NavMeshPath();
agent.CalculatePath(ObjectCellTarget, path);
Debug.Log(path.status);
if(path.status == NavMeshPathStatus.PathComplete){
agent.SetDestination(ObjectCellTarget);
}
}
Vector3 touch;
float zoomMin = 1f;
float zoomMax = 8f;
void Update(){
if(Input.GetMouseButtonDown(0)){
touch = Camera.main.ScreenToWorldPoint(Input.mousePosition);
}
if(Input.touchCount == 2){
Touch touchZero = Input.GetTouch(0);
Touch touchOne = Input.GetTouch(1);
Vector2 touchZeroLastPos = touchZero.position - touchZero.deltaPosition;
Vector2 touchOneLastPos = touchOne.position - touchOne.deltaPosition;
float distTouch = (touchZeroLastPos - touchOneLastPos).magnitude;
float currentDistTouch = (touchZero.position - touchOne.position).magnitude;
float difference = currentDistTouch - distTouch;
zoom(difference * 0.01f);
}
else if(Input.GetMouseButton(0)){
Vector3 direction = touch - Camera.main.ScreenToWorldPoint(Input.mousePosition);
Camera.main.transform.position += direction;
}
zoom(Input.GetAxis("Mouse ScrollWheel"));
}
void zoom(float increment){
Camera.main.orthographicSize = Mathf.Clamp(Camera.main.orthographicSize - increment, zoomMin, zoomMax);
}