using System.Collections; using System.Collections.Generic; using UnityEngine; public class FloorEnabler : MonoBehaviour { public SurfaceGenerator surfaceGenerator; public List surfacePrefabs; public List FloorObjs; // Start is called before the first frame update void Awake() { Starter(); } void Starter() { int index=DataManager.Instance.CURRENTLEVELINDEX%surfacePrefabs.Count; surfaceGenerator.surfacePrefab = surfacePrefabs[index]; FloorObjs[index].SetActive(true); // for (int i = 0; i < surfacePrefabs.Count; i++) // { // if (i == DataManager.Instance.CURRENTLEVELINDEX) // { // } // else // { // FloorObjs[i].SetActive(false); // } // } } }