Files
EnglewoodLAB/Assets/Sample/ContentSizeSetter/Scripts/ContentSizeSetterSample.cs

24 lines
524 B
C#
Raw Permalink Normal View History

2026-03-10 11:35:30 +09:00
namespace Gpm.Ui.Sample
{
using UnityEngine;
using UnityEngine.UI;
public class ContentSizeSetterSample : MonoBehaviour
{
public Entity entry;
public InputField input;
public RectTransform root;
public void AddEntity(RectTransform parent)
{
if (parent == null)
{
parent = root;
}
Entity add = GameObject.Instantiate<Entity>(entry, parent);
add.Init(input.text, this);
}
}
}