- Home /
Scene inside a Scene
Possible?
And I don't mean LoadLevelAdditiveAsync. I'm creating a puzzle/action game and when a level I want the game to go to a separate score screen, while having a small window replaying what the user just did.
So I want to load the previous scene inside a small window in another scene. Think Picture-in-Picture for TVs.
Really can't think how I'd do this without merging the score screen into each level scene which isn't the ideal situation for me.
Answer by DaveA · Feb 03, 2011 at 02:34 AM
Sounds like fun. What comes to mind is, record everything that happens somehow, then play that back on a render texture where the main camera looks at that texture and your score screen. Ore record the entire game play to video somehow, creating a video texture, and play that back. I hope you have Pro!
Since it's quite a basic game and graphics aren't intense at all, to do playback I was intending to record all moving objects position every frame, then turn off all physics and just feed the positions (and orientation etc) into each object every frame. This would let me change camera angles and do movie type shots as well. I can't just record it and play it back as a video unless I use different cameras... hmm. I think I'll have to move camera and look at a blank box to pretend I've loaded score screen, and use camera normalized viewport rect to show the replay in another box.
Answer by Loius · Jun 19, 2012 at 01:45 PM
The solution that jumps to mind is to have your entire score screen be a prefab with a "main" script that you can shove parameters into. Then in your game scene, you instantiate the score prefab and feed it information from the game's "you win/lose" function and trigger your current replay logic.
It's kind of merging the score screen into each scene, but changes to the prefab will affect them all so it's still reasonably well object-oriented.
Your answer
Follow this Question
Related Questions
scene loading 100's of scenes 3 Answers
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Scene object scripting 1 Answer
how to move between scenes 1 Answer
Reloading the scene causes ads to reload. Is this ok ? 3 Answers