21 lines
438 B
C#
21 lines
438 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class GIS : MonoBehaviour
|
|
{
|
|
public void SetBoxHeight()
|
|
{
|
|
var childs = GetComponentsInChildren<Transform>();
|
|
|
|
foreach(var c in childs)
|
|
{
|
|
var scale = c.localScale;
|
|
var newHeight = scale.x * scale.z;
|
|
scale.y= newHeight;
|
|
c.localScale = scale;
|
|
}
|
|
}
|
|
}
|