private void InitializeSaveData() { if (SaveData is null) { PrefabID = GetComponentInParent <PrefabIdentifier>().Id; SaveData = new CyBioReactorSaveData(PrefabID); } }
public CyBioReactorMini(BaseBioReactor bioReactor) { BioReactor = bioReactor; string id = BioReactor.GetComponentInParent <PrefabIdentifier>().Id; SaveData = new CyBioReactorSaveData(id); }
public CyBioReactorMini(ref BaseBioReactor bioReactor) { BioReactor = bioReactor; PrefabIdentifier prefabIdentifier = bioReactor.GetComponentInParent <PrefabIdentifier>() ?? bioReactor.GetComponent <PrefabIdentifier>(); string id = prefabIdentifier.Id; QuickLogger.Debug($"CyBioReactorMini PrefabIdentifier: {id}"); SaveData = new CyBioReactorSaveData(id); }