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

Position and Rotation Only Update After Manually Refreshing the Inspector #7170

Open
gabrielgilvan opened this issue Dec 14, 2024 · 0 comments

Comments

@gabrielgilvan
Copy link

gabrielgilvan commented Dec 14, 2024

Describe the bug

When spawning an object inside another GameObject to fix pivots, the position and rotation of the spawned object do not update automatically. The values are only updated when I manually refresh the Inspector.

var propObj = PropPrefab.Clone();
propObj.BreakFromPrefab();

var Parent_Empty = new GameObject();
propObj.SetParent(Parent_Empty);
 propObj.LocalPosition = -propObj.GetBounds().Center;
Parent_Empty.LocalPosition = prop.Pos;
Parent_Empty.LocalRotation = prop.Rot;

To Reproduce

  1. Clone a prefab and break it from the prefab connection.
  2. Create a new empty GameObject to serve as a parent.
  3. Set the parent of the cloned object.
  4. Set its LocalPosition and LocalRotation.

Expected behavior

expected to behave like a object with no child.

Media/Files

Dev.-.HardDeal.-.s.box.editor.2024-12-14.01-18-47.mp4

Additional context

No response

@github-project-automation github-project-automation bot moved this to To triage in s&box tracker Dec 14, 2024
@github-project-automation github-project-automation bot moved this from To triage to Done in s&box tracker Dec 14, 2024
@gabrielgilvan gabrielgilvan reopened this Dec 14, 2024
@github-project-automation github-project-automation bot moved this from Done to To triage in s&box tracker Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To triage
Development

No branches or pull requests

1 participant