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

Question How to duplicate a 2D animation frame?

Discussion in '2D' started by fakedev, Jul 24, 2023.

  1. fakedev

    fakedev

    Joined:
    Jan 14, 2023
    Posts:
    10
    I've got a 2D sprite animation made of three frames: A, B, C.

    How to duplicate the B frame as: A, B, C, B?

    Do I need to duplicate the spritesheet? (Copy & Paste, Duplicate don't seem to be avaible in the Animation window.)
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,563
    From the animation window you should be able to select the keyframe that sets B, copy it, move the timeline to where you want the NEW B to be located and paste it back in.
     
  3. fakedev

    fakedev

    Joined:
    Jan 14, 2023
    Posts:
    10
    I can select the given "B" sprite. I can even move it in the timeline. However, there is no obvious way to copy & paste any frame: there is no such option in the contextual menu, ctrl+c/ctrl+v, or even ctrl+d have no effect.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,563
    Hm, that's not my experience. I can drag-box select arbitrary things in the Animation window, Ctrl-C, then move the timeline and it pastes them all in at another timepoint.

    For instance I selected these:

    Screen Shot 2023-07-25 at 8.20.15 AM.png

    Moved my red line to where you see it and pasted, then squished the copied ones in time:

    Screen Shot 2023-07-25 at 8.20.37 AM.png

    It all does what I would expect...
     
  5. fakedev

    fakedev

    Joined:
    Jan 14, 2023
    Posts:
    10
    My bad. :( You're right! Thank you! :)
     
    Kurt-Dekker likes this.