I tried to get the player ship game object to move to the next scene if all enemies are killed and won the game. I get an error in the Unity console says:
Assets\Scripts\GameController.cs(57,25): error CS0122: 'SceneLoader.LoadNextScene()' is inaccessible due to its protection level.
Currently, I can only go to the next scene when I change the value in the of this line:
SceneManager.LoadScene(1); 
to (2) in the scene Loader.cs I added code to the game controller this here: the public void WinGame() method any feedback to what this error s means and how I can fix it is appreciated. :)
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneLoader : MonoBehaviour
{
    [SerializeField] float levelLoadDelay = 2f;
    private int currentSceneIndex = -1;
    private void Awake()
    {
        currentSceneIndex = SceneManager.GetActiveScene().buildIndex;
    }
    private void Start()
    {
        if (currentSceneIndex == 0)
        {
             Invoke("LoadFirstScene", 2f);
        }
        private void LoadNextScene()
        {
            int currentSceneIndex =   SceneManager.GetActiveScene().buildIndex;
            int nextSceneIndex = currentSceneIndex + 1;
            SceneManager.LoadScene(nextSceneIndex);
        }
        public void LoadFirstScene()
        {
            SceneManager.LoadScene(1);
        }
    }
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.UI;
public class GameController : MonoBehaviour
{
    public Text scoreText;
    public Text restartText;
    public Text gameOverText;
    [SerializeField] private Text outcome;
    [SerializeField] private PlayableDirector masterTimelinePlayableDirector;
    [SerializeField] private GameObject playerShip;
    private bool winGame = false;
    private bool gameOver = false;
    private int score;
    private int enemiesLeft = 0;
    private SceneLoader sceneLoader;
    public bool allEnemiesKilled;
    public float enemiesInScene = 10.0f;
    public float enemiesKilled;
    void Start()
    {
        sceneLoader = FindObjectOfType<SceneLoader>();
        enemiesLeft = GameObject.FindObjectsOfType<Enemy>().Length;
        restartText.text = "";
        gameOverText.text = "";
        outcome.text = "";
        score = 0;
        UpdateScore();
    }
    void Update()
    {
        if (gameOver)
        {
            if (Input.GetKeyDown(KeyCode.R))
            {
                 sceneLoader.LoadFirstScene();
            }
        }
        if (PlayerHealth.cur_health <= 0)
        {
            GameOver();
        }
    }
    public void WinGame()
    {
        if (enemiesKilled < enemiesInScene)
        {
             allEnemiesKilled = true;
        }
        sceneLoader.LoadNextScene();
    }
    public void DecreaseEnemyCount()
    {
        enemiesLeft--;
    }
    public void AddScore(int newScoreValue)
    {
        score += newScoreValue;
        UpdateScore();
    }
    void UpdateScore()
    {
        scoreText.text = "Score: " + score;
    }
   public void GameOver()
   {
        gameOver = true;
        gameOverText.text = "Game Over!";
        if (enemiesLeft > 0)
        {
             outcome.text = "You Lose";
        }
        else
        {
            outcome.text = "You Win";
        }
        restartText.text = "Press 'R' for Restart";
        masterTimelinePlayableDirector.Stop();
        playerShip.SetActive(false);
    }
}
 
     
     
    