void Start() { sideScrollMap = GetComponent <SideScrollMap>(); if (sideScrollMap == null) { Debug.Log("ItemSpawner: Item Spawner is not working because it could not reach the SideScrollMap."); } }
void Start() { IsEnabled = true; sideScrollMap = GetComponent <SideScrollMap>(); if (sideScrollMap == null) { IsEnabled = false; // Debug.Log("ItemSpawner: Item Spawner is not working because it could not reach the SideScrollMap."); return; } levelDataModel = sideScrollMap.GetLevelDataModel(); levelGenerationDataModel = sideScrollMap.GetLevelGenerationDataModel(levelDataModel.LevelType); objectsContainer = GameObject.Find("ObjectsContainer"); }