public class Anim : MonoBehaviour
{
public AnimType animType;
private void Start()
{
animType = (AnimType)System.Enum.Parse(typeof(AnimType), transform.name);
}
}
Unity---string转换为Enum枚举类型
最新推荐文章于 2025-03-23 16:43:57 发布