Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

camera backbuffer

Discussion in 'iOS and tvOS' started by Gaspedal, Nov 8, 2009.

  1. Gaspedal

    Gaspedal

    Joined:
    Mar 29, 2009
    Posts:
    376
    Is it possible to copy the Backbuffer (or Frontbuffer) of the Maincamera to a texture ?
    I want make a backward-replay function of the latest 2 seconds of the game.

    the recording of the positions is not the best way, because I can't copy the positions of the particles and on iPhone maybe I get less frames if I have a lot of gameobjects.

    My customer want replay exact the same scene including particle effects.

    Any Idea how to make this ?
     
  2. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    Texture2D has a function called ReadPixels that reads an area of screen into a texture. Speed may be an issue if you are recording gameplay live as a "video", though.
     
  3. rich2020

    rich2020

    Joined:
    Aug 31, 2013
    Posts:
    26
    Sorry for the resurrection here... but I would like to know if there is anything faster? In other words, is there something that is faster at getting the screen pixels?