// Start is called before the first frame update void Awake() { objectiveArrow = GetComponent <ObjectiveArrow>(); data = new ObjectiveArrowsData { objectiveEnabled = objectiveArrow.objectiveEnabled, objectiveKeepDisabled = objectiveArrow.objectiveKeepDisabled, enableArrows = objectiveArrow.enableArrows, objectiveList = objectiveArrow.objectiveList }; //get/set }
public override void setLoadData(object obj) { if (objectiveArrow == null) { objectiveArrow = GetComponent <ObjectiveArrow>(); } data = (ObjectiveArrowsData)obj; objectiveArrow.objectiveEnabled = data.objectiveEnabled; objectiveArrow.objectiveKeepDisabled = data.objectiveKeepDisabled; objectiveArrow.enableArrows = data.enableArrows; objectiveArrow.objectiveList = data.objectiveList; }