mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-22 17:45:16 +00:00
14 lines
414 B
C#
14 lines
414 B
C#
using UnityEngine;
|
|
|
|
public class ForceScaleIdentity : MonoBehaviour
|
|
{
|
|
public GameObject parent;
|
|
|
|
void Update()
|
|
{
|
|
if (parent == null)
|
|
transform.localScale = new Vector3(1f / transform.parent.localScale.x, 1f / transform.parent.localScale.y);
|
|
else
|
|
transform.localScale = new Vector3(1f / parent.transform.localScale.x, 1f / parent.transform.localScale.y);
|
|
}
|
|
}
|