mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2024-11-23 22:27:58 +01:00
21 lines
557 B
C#
21 lines
557 B
C#
using UnityEngine;
|
|
|
|
namespace Fie.Title
|
|
{
|
|
public class FieTitleElementsScaleNormalizer : MonoBehaviour
|
|
{
|
|
private Vector3 defaultScale = Vector3.zero;
|
|
|
|
private void Start()
|
|
{
|
|
defaultScale = base.transform.lossyScale;
|
|
}
|
|
|
|
private void LateUpdate()
|
|
{
|
|
Vector3 lossyScale = base.transform.lossyScale;
|
|
Vector3 localScale = base.transform.localScale;
|
|
base.transform.localScale = new Vector3(localScale.x / lossyScale.x * defaultScale.x, localScale.y / lossyScale.y * defaultScale.y, localScale.z / lossyScale.z * defaultScale.z);
|
|
}
|
|
}
|
|
}
|