using System.Collections; using System.Collections.Generic; using UnityEngine; [ExecuteInEditMode] public class LODGroupOverride : MonoBehaviour { public float lodSize = 1.0f; public Vector3 localReference = Vector3.zero; // Use this for initialization void OnStart () { GetComponent().size = lodSize; GetComponent().localReferencePoint = localReference; } #if UNITY_EDITOR void Update () { if (GetComponent().size != lodSize) GetComponent().size = lodSize; if (GetComponent().localReferencePoint != localReference) GetComponent().localReferencePoint = localReference; } #endif }