21 lines
529 B
C#
21 lines
529 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class inputBoxWithButton : MonoBehaviour
|
|
{
|
|
|
|
public ModeEnum mode = ModeEnum.autofill;
|
|
private void Update()
|
|
{
|
|
if (mode == ModeEnum.autofill)
|
|
{
|
|
GetComponent<ContentSizeFitter>().horizontalFit = ContentSizeFitter.FitMode.Unconstrained;
|
|
}
|
|
else {
|
|
GetComponent<ContentSizeFitter>().horizontalFit = ContentSizeFitter.FitMode.PreferredSize;
|
|
}
|
|
}
|
|
}
|