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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Prefab wont initialize animation

Discussion in '2D' started by harveyshideout, Feb 4, 2016.

  1. harveyshideout

    harveyshideout

    Joined:
    Jan 12, 2014
    Posts:
    33
    I create a game object, i drag a sprite into render, I add an animation, I create a prefab, I drag the game object onto prefab..when I run the game the prefab is stuck on the sprite and wont play the animation....what am I doing wrong???
     
  2. LiterallyJeff

    LiterallyJeff

    Joined:
    Jan 21, 2015
    Posts:
    2,802
    How are you adding the animation? Did it work before you made it a prefab?
     
  3. harveyshideout

    harveyshideout

    Joined:
    Jan 12, 2014
    Posts:
    33
    yes, i create a game object then an animation in the animation tab, it works fine until dragged into a prefab
     
  4. harveyshideout

    harveyshideout

    Joined:
    Jan 12, 2014
    Posts:
    33
    seems like you have to set the animation to legacy in the rig tab however I think this is for 3D, either way there is no such option in 2D