Forum rules - please read before posting.

Black screen on Nintendo Switch build

Hello there,

Saw that the compiler errors when using Nintendo Switch have been fixed.

Imported AC into a fresh Switch project, no issues there, but when I run a build of the 3D Demo (or any demo) on the development device itself, I just get a black screen.

I know that Switch support isn't official, but has anyone had any luck getting AC to run on the device that can point me in the right direction?

Any help would be much appreciated.

Kindest,
Mark

Comments

  • Did some digging and found that an error was being caused by the CreateDirectory() function and the black screen is actually the game crashing.

    @ChrisIceBox has said to put the following line of code in to change the save system from trying to write to the Persistant Data Path to PlayerPrefs:

    SaveSystem.SaveFileHandler = new SaveFileHandler_PlayerPrefs ();

    I'm just not sure where to put this line so that it prevents the game from crashing.

    Again, any help would be much appreciated.

    Kindest,
    Mark

  • edited January 11

    See the Manual's "Custom save formats and handling" chapter - it should go in the Awake function of a script placed in your game's opening scene. For example:

    ForcePlayerPrefs.cs:

    using UnityEngine;
    using AC;
    
    public class ForcePlayerPrefs : MonoBehaviour
    {
        void Awake ()
        {
            SaveSystem.SaveFileHandler = new SaveFileHandler_PlayerPrefs ();
        }
    }
    
  • Thanks! That seemed to have worked.

    Next mission is diving into the saving bits and getting that to all work on Switch.

    Thanks again!

  • @marky Did you ever get around to diving into the saving system on the Switch? I'm doing some (unsuccessful so far) tests myself, and would be happy if you could share any experiences. PM if there's NDA stuff you want to share :)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.