Code Monkey home page Code Monkey logo

fredericrp / screentransitions Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 990 KB

Between scenes, to hide loading time or simply make a smooth transition, you have to show a transition screen. Those prefabs allow you to call the transition to be shown or hidden. Subscribe to its events (TransitionShown and TransitionHidden) to know when you can load something behind the players back.

License: MIT License

C# 67.48% ShaderLab 32.52%
transition-systems unity3d transition

screentransitions's Introduction

openupm

Transition

Between scenes, to hide loading time or simply make a smooth transition, you have to show a transition screen. Those prefabs allow you to call the transition to be shown or hidden.

Subscribe to its events (TransitionShown and TransitionHidden) to know when you can load something behind the players back.

Requires the EventHandler and Singleton.

how it is supposed to work

Description

There are two types of transition:

  • Doors : use two images that hide the screen by scrolling from the left and right borders of the screen,
  • CutOff : use a gradient image to show/hide a texture fullscreen, you can create a transition like Animal Crossing with this one.

Usage

  1. Place chosen prefab in scene
  2. Call Transition.Show()
  3. Do whatever you want behind the player's back
  4. Call Transition.Hide()

Optionnal: subscribe to the game events to trigger at the right time what you want to do.

Demo

A demo is present under the Sample folder.

  1. Load the scene
  2. Click the Play button
  3. In the editor, use the [S] key to show the transition, and the [H] key to hide it.

demo

Combining this to the EasyLoading asset, here is what you can get:

demo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.