The Transitions FX extension allows you to create in and out “appear” animations for your camera. This is useful for entering and exiting scenes with a cool and smooth transition. The transitions are made with shaders and more will be added soon.
If you make changes during runtime on the extension, afterwards you need to call the following methods:
Transition FX (Enter/Exit): The effect we want to use, on the Enter or on the Exit animation. The settings below are related to this choice
Duration: How long should the animation last
Delay: How long it takes for the animation to start
Ease Type: The ease type of the animation
Background Color: The color that fills the background of the effect
Direction: The direction of the animation (in case it has one)
Side: The side of the animation (in case it has one)
Blinds: The number of blinds (Blinds FX only)
Start Scene On Enter State: If enabled, the scene will “pre-load” the Enter state once the scene starts. This requires you to manually call the TransitionEnter method to continue the animation
FX over UI
If you need your transitions to appear over Unity's standard UI, you need to follow these steps:
- Create a second camera (regular Unity camera) and call it for example "UICamera" - Remove the AudioListener and the other components from this camera.
- Make it a child of the ProCamera2D camera and set its position to (0, 0, 0)
- Set the UICamera "Clear Flags" to "Don't clear".
- Set the UICamera "Culling Mask" to only the "UI" layer.
- Set the UICamera "Depth" to 1.
- On the ProCamera2D's "Culling Mask" uncheck the UI layer
- Add the TransitionsFX component to the UICamera instead of the ProCamera2D. You can simply move it from one to the other, or remove and add it manually.
- Change your Canvas "Render Mode" to "Screen Space - Camera" and under the "Render Camera" field add your newly created UICamera
- Enjoy the TransitionsFX over your UI ;)