Forum rules - please read before posting.

Linking Title Screens to Scenes

Hello!

I've been doing some internetting but can't really find an answer to this question, so I figured I should go ahead and post it here. My project is a 2D game, similar to the one in the tutorial, with many different scenes linked together that you can go back and forth between. I got through like 10 scenes, then decided it was time to create the Title Screen, and then like, an Introduction screen, something that says like "CHAPTER1:Blah blah blah".

I followed the tutorials for creating the Title screen, and it worked well, except now I have scenes 1-10, all with their scene links created, and now the Title Screen is scene 11, and the Chapter 1 screen is scene 12. Is there any way to easily get the Title Screen to be the first thing displayed without renumbering the scenes, and then having to go through and fix every single one of the links? The game will eventually have many scenes, so I can see this becoming a problem again down the line if I want to create another Chapter scene (chapter 2, 3, etc) but forget to do it first.

Like this would all be easily fixed if you could create like a -1, and -2, or a 0.5, 0.75 for scenes, but I don't think thats allowed.

I know just renumbering them all and updating the scene links would fix the problem, but I was curious if there was a smarter way to do it.

Thanks!

Comments

  • Scene index numbers have to be whole numbers, and the first one listed in the Build Settings has to be the first one that is loaded. This is a behaviour of Unity, though.

    The minimal workaround, I think, would be to swap your first scene in the list for your title screen (or even a dummy one that loads in the first "proper" scene). Then, you should only have to update scenes that reference the scene that was originally with an index of 0.

    Scenes can be referenced by name as well as build index number, though, so as long as all your scenes have unique names then you can use that to reference them instead.

    Just know that save game data refers to scenes internally by index, so you'll have problems with old saves if you re-order the scenes in the Build Settings.

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.