using System.Collections; using System.Collections.Generic; using UnityEngine; public class MinimapSize : MonoBehaviour { GameObject MinimapMesh; public void SetSize() { MinimapMesh = FindObjectOfType().gameObject; if (MinimapMesh != null) { float size = MinimapMesh.GetComponent().mesh.bounds.size.magnitude; GetComponent().orthographicSize = size*0.5f; } } }