scene fade out and credits

how to fade out and show credits on trigger?

  1. Insert a trigger into your world somewhere.
  2. Use OnTriggerEnter to trigger the event.
  3. Create a Coroutine that slowly fades a black GUITexture or UnityGUI `GUI.Texture` call over a predetermined period of time.
  4. After the screen is 100% black, wait a few seconds (using `WaitForSeconds(x)`)
  5. Call `Application.LoadLevel` and load your credits scene, which should be separate from your main game scene.

See http://www.lemodev.com/?p=232