2
\$\begingroup\$

I'm trying to work with the new SceneManager class with Unity, I'd like to have smooth transitions between scenes. Currently I suppose that the only way to do those transitions is to manually implement them on the scene objects leveraging on the fact that scenes can be loaded additively.

In pseudo code I image something like:

for gameObject in previousSceneGameObjects 
    gameObject.animateSceneExit()
endFor

for gameObject in nextSceneGameObjects 
    gameObject.animateSceneEnter()
endFor

I feel that there is something I'm missing :P which is the best approach that you'd suggest? Is it my approach valid?

\$\endgroup\$
6
  • \$\begingroup\$ I really like this idea, unfortunately I don't know much about how the SceneManager works so can't help you but good luck. \$\endgroup\$
    – Malrig
    Commented Feb 23, 2016 at 8:23
  • \$\begingroup\$ Can you elaborate it more? :| \$\endgroup\$ Commented Feb 23, 2016 at 9:52
  • \$\begingroup\$ What is a smooth transition? Fade out -- load scene -- fade in? More input required. \$\endgroup\$
    – jgallant
    Commented Feb 23, 2016 at 11:17
  • \$\begingroup\$ @Jon with a smooth transition I mean whatever transition that doesn't make the scene suddenly change. So it might be a fadeout/fadein or a transition animation... it doesn't really matter which animation I end up with. \$\endgroup\$
    – MatterGoal
    Commented Feb 23, 2016 at 13:10
  • \$\begingroup\$ I am actually in the middle of making a library for this. It should be out in one month. I'll share my current progress when I get around a computer. github.com/evorlor \$\endgroup\$
    – Evorlor
    Commented Feb 23, 2016 at 14:47

1 Answer 1

1
\$\begingroup\$

Your animateAppear term indicates that you want fade-in, fade-out effect. Correct me if I am wrong, for that,

Just a tricky suggestion :)

I think you can achieve this by placing a black or white sprite above all. fade it in when you are exiting from scene, and in next scene you can do the same in opposite way when entering into another scene. No need to use additive scene.

\$\endgroup\$
3
  • \$\begingroup\$ Thanks for you comment. I've substituted the terms with animateSceneExit and animateSceneEnter so that it is clear that the animation that I choose is not important. What I'm interested in is the logic behind the implementation of these transitions. \$\endgroup\$
    – MatterGoal
    Commented Feb 23, 2016 at 13:12
  • \$\begingroup\$ You know, that makes your question too broad \$\endgroup\$ Commented Feb 23, 2016 at 14:34
  • \$\begingroup\$ I can't understand why the question sounds too broad to you actually. I'm asking which is the best structure to implement this logic... the animation is just not relevant. The logic should be the same if I apply fadein or transform animation to the game objects of the active scenes. \$\endgroup\$
    – MatterGoal
    Commented Feb 24, 2016 at 10:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .