using System.Collections; using System.Collections.Generic; using UnityEngine; public class CloneSixLadder : CloneSingleObj { public override void Awake() { ResourcesName = "Prefab/Tool/SixLadder"; cloneObjType = CloneObjType.SixLadder; base.Awake(); } /// /// 添加初始状态记录 /// /// public override void AddRecordFrame(List list) { foreach (Transform child in transform) { var data = new RecordSixLadder(); SetBaseData(data, child); data.upLadderPos = child.Find("LadderUp").localPosition; string json = JsonUtility.ToJson(data); var objectJson = new ObjectData(); objectJson.cloneObjType = cloneObjType; objectJson.json = json; list.Add(objectJson); } } } public class RecordSixLadder : RecordObjectBase { public Vector3 upLadderPos; }