Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GameObject with 2D Sprite Component not rendering correctly in editor #23

Open
NPVallejos opened this issue Sep 11, 2024 · 2 comments
Open

Comments

@NPVallejos
Copy link

Describe the bug

When working with a GameObject with 2D Sprite Component, the 2D Sprite's position in the editor does not match the GameObjects position. Instead, the 2D Sprite stays in the same position it was initially placed. What's more odd is that if you move the GameObject around while in the editor and then press ctrl + z, the sprite will jump to the gameobjects position.

To Reproduce

  1. Create new project
  2. Go to Library Manager
  3. Install Sprite Tools
  4. In the Hierarchy, create a new empty GameObject and name it 'Player'
  5. In the inspector for the 'Player' click Add Component and select 2D Sprite Component
  6. Under 2D Sprite Component, click Sprite which will open a pop-up window
  7. In the pop-up window, select Cloud > Everything > Sprite > Citizen Test Sprite
  8. Move the GameObject named 'Player' around in the editor a few times
  9. Press Ctrl+z and you'll see the sprite will finally appear in the same location as the GameObject

Expected behavior

The expected behavior is that the 2D Sprite position will match the GameObject's position when the GameObject is moved.

Media/Files

2DSpriteBugDemo.mp4

In the video, I have a GameObject named goo setup with a 2D Sprite Component and set the Sprite to a custom made image. I switch the camera from 3D to 2D Top Down. Then I move the GameObject with the 2D Sprite Component, and you'll notice that the sprites position does not update with the GameObjects position until I start pressing Ctrl + Z.

Additional context

I am running Windows 10.

@CarsonKompon
Copy link
Collaborator

Is this still happening for you @NPVallejos? I cannot seem to replicate it.
Can you send a zipped repro project following the steps you explain (since they do not replicate it for me)

@NPVallejos
Copy link
Author

Currently will be away for a week! I will get back to you on September 23rd with my project zip, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants