c#类的序列化

来源:互联网 发布:055大驱数据 编辑:程序博客网 时间:2024/06/09 22:46
using System.Collections;
using System.Collections.Generic;
using UnityEngine;


public class SerializeAClass : MonoBehaviour {


    [System.Serializable]
    public class Target {
        public enum Sorts { 
            Height,
            Length,
            Width
        }
        public int a;


        public GameObject b;
        [Range(0, 1)]
        public float c;
    }
    public Target ItsTarget = new Target();
}
原创粉丝点击