XRoom_Unity/Assets/ScaleCon.cs
2025-05-31 10:20:20 +03:30

22 lines
483 B
C#

using UnityEngine;
public class ScaleCon : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
size = transform.localScale;
realParent = transform.parent;
}
public Vector3 size;
public Transform realParent;
// Update is called once per frame
void Update()
{
if(transform.parent== realParent)
transform.localScale = size;
}
}