void Update() { if (NeedUpdateModel) { if (Model != null) { Destroy(Model); } Model = HumanModelBuilder.BuildModel(ModelInfos, UnitEquipment); SetParent(Model.transform, ModelRoot.transform); NeedUpdateModel = false; } }
// HUMAN public void LoadModel() { Model = HumanModelBuilder.BuildModel(HumanModelInfos, UnitEquipment); Model.transform.parent = this.transform; }