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 Beginner questions: Prefab set to 0.5 but get scaled to 1 when i press play [Solved]

Discussion in '2D' started by Dustyguy, Aug 28, 2020.

  1. Dustyguy

    Dustyguy

    Joined:
    May 13, 2015
    Posts:
    5
    [Solved] I have a prefab that is set to 0.5 on X and Y (2d) when i place it in the scene it is still 0.5 on x and y but once i press play the gameobject x and y jump to 1.

    Solution: the idle animation attached to the object scaled the object.
     
    Last edited: Aug 28, 2020
  2. HumanBee

    HumanBee

    Joined:
    Aug 17, 2020
    Posts:
    1
    It is likely that it is being changed by the script in the start or update functions(if you have a script attached.)
     
    Dustyguy likes this.
  3. Dustyguy

    Dustyguy

    Joined:
    May 13, 2015
    Posts:
    5
    have a script attached but i already tryed that part and removed the script. did not work. still gets scaled up. there is only a spriterenderer and a animator attached.

    while i write this i noticed the idle aimation scales the object. Thanks for making me check my attachments. :)