// Start is called before the first frame update void Awake() { dialog = GetComponent <DialogueTrigger>(); data = new DialogObjectData { hasBeenShown = dialog.DialogHasBeenShown, isActive = gameObject.activeSelf }; //get/set }
public override void setLoadData(object obj) { if (dialog == null) { dialog = GetComponent <DialogueTrigger>(); } data = (DialogObjectData)obj; dialog.DialogHasBeenShown = data.hasBeenShown; gameObject.SetActive(data.isActive); Debug.Log("data.hasBeenShown:" + data.hasBeenShown); Debug.Log("data.isActive:" + data.isActive); }