ScreenWipes

Author: Eric Haines (Eric5h5)

Description
Makes various animated screen wipes: cross-fade (two versions, for Unity and Unity Pro), rectangular zoom (in or out), arbitrary shape zoom and spin, a squish scroll (four directions), and a wavy "dream" wipe (requires Unity Pro). Requires Unity 2.6 or later.

Usage
See CrossFade, CrossFadePro, DreamWipe, RectangleWipe, ShapeWipe, and SquishWipe for usage directions. This is the base script that contains the functions for all the wipes. It must be attached to some object in the scene in order for it to work, and should be located in your Standard Assets folder (if you don't have one, make one), so it can be used easily by C# and Boo scripts. It has a static variable called "use" that points to this script, so getting a reference isn't necessary. For example, CrossFade would be called like this:

or

You can call the functions without "yield", in which case they will return immediately. They'll still run the specified length of time, but you won't know when they're done, and should be careful about calling them multiple times simultaneously with the same cameras, because strange behavior will of course result.

See the file below for a UnityPackage that contains example scenes of usage, so you can see how they work in practice. Import the UnityPackage into an empty project for best results.

[[Media:ScreenWipes.zip|ScreenWipes.zip]] ‎ (211KB, MIME TYPE: ) Eric's one.

[[Media:ScreenWipes2.zip|ScreenWipes2.zip]] ‎ (211KB, MIME TYPE: ) Berenger's one. (16-02-12)

History
16 Feb 2012 Possibility to use animation curves to control the wipes velocity. Function have been overloaded, so everything done before that update will work, with the exact same result. Pro parts not done, I don't have Unity pro. - Berenger