private void ReadySaveData()
        {
            if (prefabId == null)
            {
                PrefabIdentifier prefabIdentifier = GetComponentInParent <PrefabIdentifier>() ?? GetComponent <PrefabIdentifier>();
                prefabId = prefabIdentifier.id;
            }

            if (prefabId != null && _saveData == null)
            {
                QuickLogger.Debug($"AuxCyUpgradeConsole PrefabIdentifier {prefabId}");
                _saveData = new AuxCyUpgradeConsoleSaveData(prefabId);
            }
        }
Exemple #2
0
        public override void Awake()
        {
            base.Awake();

            if (Buildable == null)
            {
                Buildable = GetComponentInChildren <Constructable>();
            }

            if (SaveData == null)
            {
                string id = GetComponentInParent <PrefabIdentifier>().Id;
                SaveData = new AuxCyUpgradeConsoleSaveData(id);
            }

            if (this.Modules == null)
            {
                InitializeModules();
            }
        }