Search Unity

Question Question toward Conversion of Transform : CompositeScale or NonUniformScale

Discussion in 'Entity Component System' started by seojihyuk, Jul 24, 2021.

  1. seojihyuk

    seojihyuk

    Joined:
    Sep 19, 2014
    Posts:
    30
    I'm doing around Hybrid ECS and using default ConvertToEntity system.
    I recently found some of my Entities converted from GOs have CompositeScale and others have NonUniformScale.
    But I can't undestand the reason why they have different ScaleComponents.
    Can somebody explain to me about the condition?
     
  2. RoughSpaghetti3211

    RoughSpaghetti3211

    Joined:
    Aug 11, 2015
    Posts:
    1,709
    If your game object with a non uniform scale like y is a higher value that x or z the conversation system will add a non uniform scale component. If all the scale values are the same you will not see a non uniform scale component. I’ve run into an issue where I used the ConvetToEntity component on a game object with uniform scale, then at run time I ran into issues when trying to scale in Y only because I had no nonUniformScale component for the auto conversion.
     
  3. seojihyuk

    seojihyuk

    Joined:
    Sep 19, 2014
    Posts:
    30
    Thanks for your reply.
    I've doing 2D stuff so my scale in Z is 1 and others are different. So it must make NonUniformScale I guess, But some of my Entites have only CompositeScale not NonUniformScale. And I can't understand why.
     
  4. varnon

    varnon

    Joined:
    Jan 14, 2017
    Posts:
    52