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

What`s this error message "Setting scale failed, ignoring request"

Discussion in 'Scripting' started by Lagnas, Sep 4, 2015.

  1. Lagnas

    Lagnas

    Joined:
    Apr 27, 2014
    Posts:
    18
    Setting scale failed, ignoring request. Please check all scaling axes are non-zero.
    UnityEngine.Transform:SetParent(Transform)


    My all object`s scale is not zero. And, I instance a object, setparent to empty object.
    But that error message occur. Why?
     
  2. gorbit99

    gorbit99

    Joined:
    Jul 14, 2015
    Posts:
    1,350
    You should use InstantiatedObject.transform.parent = <Put Parent's Transform here>;
     
  3. Lagnas

    Lagnas

    Joined:
    Apr 27, 2014
    Posts:
    18
    I did. But same error message occur.
     
  4. gorbit99

    gorbit99

    Joined:
    Jul 14, 2015
    Posts:
    1,350
    then check, if the prefab, or the object, you're instantianting don't have any of it's scale on 0
     
  5. Lagnas

    Lagnas

    Joined:
    Apr 27, 2014
    Posts:
    18
    I checked it. All object have non-zero scale axis.
     
  6. nyonge

    nyonge

    Joined:
    Jul 11, 2013
    Posts:
    49
    @Lagnas ever get any updates to this? I'm running into the same error message now.
     
  7. Deleted User

    Deleted User

    Guest

    I get this when Undoing after calling Undo.RegisterCompleteObjectUndo(transform, "Foo"); (no stack trace).
    Warning is printed regardless of whether the transform has a parent or not. Scale is 1,1,1.
    Interestingly, the warning is printed twice. However, if I used Undo.RecordObject instead, it is printed only once.
    This can probably safely be ignored until it is fixed.