using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class GIS : MonoBehaviour { public void SetBoxHeight() { var childs = GetComponentsInChildren(); foreach(var c in childs) { var scale = c.localScale; var newHeight = scale.x * scale.z; scale.y= newHeight; c.localScale = scale; } } }