Search Unity

CopyTransformToGameObject doesn't work with Position2D

Discussion in 'Entity Component System' started by Fido789, Jul 1, 2018.

  1. Fido789

    Fido789

    Joined:
    Feb 26, 2013
    Posts:
    343
    It works with Position, but not with Position2D. But it should, or am I missing something? How can I copy Position2D to regular Transform?

    What I want to do is to work with Position2D from within a system and have it promoted back to GameObject's Transform. CopyTransformToGameObject + Position works, but CopyTransformToGameObject + Position2D does not. I can live with that, but it is 2D game, so working with Z coord is kinda superfluous.
     
    Last edited: Jul 1, 2018
  2. Fido789

    Fido789

    Joined:
    Feb 26, 2013
    Posts:
    343
    I have noticed that it is just a system that copies Position to Transform, so I can make similar system with desired behaviour myself.