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 2019

    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 :)

  • SFGSFG
    edited August 2019

    Seriously, this seems to be a trending request, I wish someone would write a blog post or write out how they got it to work. I mean there's no point in everyone reinventing the wheel. Found 3 posts in the forums talking about getting saving to work on the switch, each ends with the same "going to dive into" or "I think I got it to work" and no followup on HOW.

    Not that it necessarily helps me personally, I'm looking more at 2DS support at the moment... But that's only consideration. Seems the new Switch Lite is becoming the go-to portable console as 3/2DS title sales have fallen by 60% since it's launch. Though I don't think it's dead yet, as Nintendo just launched a new 2019 version of the 2DS, while winding down the 3DS (manufacturing of the 3DS has stopped in Japan entirely, while the 2DS is still going strong). I view it as a budge portable as it can be bought for $79.99 new or $39.99 used.

  • I am also currently making a game with a hope to get to switch, guess I'll have to pay someone to port it if it's ever finished / successful.

  • Wow... To think we all asked this over 2 years ago and no response... Well I know for a fact at least one of us got their game out on Switch (not me), care to share the save game magic?

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.