HeavenStudioPlus/Assets/Scripts/Transform/ForceScaleIdentity.cs

10 lines
218 B
C#
Raw Normal View History

2021-12-19 04:10:43 +00:00
using UnityEngine;
public class ForceScaleIdentity : MonoBehaviour
{
void Update()
{
transform.localScale = new Vector3(1f / transform.parent.localScale.x, 1f / transform.parent.localScale.y);
}
}