Hi, I have such a bug
what can I do?
Assets\Scripts\WaveConfigSO.cs(2,29): error CS0246: The type or namespace name ‘ScriptableObject’ could not be found (are you missing a using directive or an assembly reference?)
My Code:
[CreateAssetMenu(menuName = “Wave Config”, fileName = “New Wave Config”)]
public class WaveConfigSO : ScriptableObject
{
[SerializeField] List<GameObject> enemyPrefabs;
[SerializeField] Transform pathPrefab;
[SerializeField] float moveSpeed = 5f;
public int GetEnemyCount()
{
return enemyPrefabs.Count;
}
public GameObject GetEnemyPrefab(int index)
{
return enemyPrefabs[index];
}
public Transform GetStartingWaypoint()
{
return pathPrefab.GetChild(0);
}
public List<Transform> GetWaypoints()
{
List<Transform> waypoints = new List<Transform>();
foreach(Transform child in pathPrefab)
{
waypoints.Add(child);
}
return waypoints;
}
public float GetMoveSpeed()
{
return moveSpeed;
}
}