Unity技巧和知识

右键添加ScriptableObject

[CreateAssetMenu(menuName="CreateConfig/Enemy")]
public class EnemyInfo : ScriptableObject
{
    public int MaxHealths;
    public int MaxStaminal;
}

[CreateAssetMenu(fileName = "EnemyInfoConfig", menuName = "CreateConfig/EnemyConfig", order = 0)]
public class EnemyInfoConfig : ScriptableObject {
    public List<EnemyInfo> list;
}
上一篇:k8s之list-watch机制、节点调度以及亲和性


下一篇:.asset资源文件使用