Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by axCed · Nov 01, 2013 at 04:18 PM · rotationtransformprefabpositionrevert

Why prefab revert does not work for position and rotation?

I made position change to the prefab for one of my gameObject that I have in each of my scene. My goal is that in each different scene that object uses the default position of the prefab.

The problem is that the position change made in prefab does not apply to my gameObjects. Also, when I open a scene, select my gameObject and press the revert button in the inspector window, everything does seem to revert except the position and the rotation...

So what's up with that? Why is it not working?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Tomer-Barkan · Nov 01, 2013 at 04:42 PM 1
Share

A prefab is meant to be like template. The position is not part of the template, it's part of the instance. For that reason, changing position of a prefab does not affect the position of the instances. Think of the pretty common scenario where you have 3 instances of the same prefab in the same scene (3 enemies for example). You wouldn't want them all to be in the same place...

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Owen-Reynolds · Nov 01, 2013 at 06:09 PM

For probably 99% of uses, Reverting a prefab should keep the current position/rotation.

They've maybe dragged in a bunch of chair prefabs, faced them in a circle, and are tweaking each one's look. They decide they hate the changes on one, and click Revert. They probably expect the scale to snap back, and clearly all the child local positions (legs?,) but they don't want the entire chair to snap to the corner of the map, facing North.

If you need all copies of prefab X to auto-share a common pos/rot, you could put a tiny script on the prefab that snaps position/rotation in Start/Awake.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

17 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

transform.forward doesn't work in my code 3 Answers

how to ignore transform.position.y 3 Answers

How to center prefabs' children to (0, 0, 0) without changing their position relative to each other 1 Answer

Accurate placed object's transform messes up on game start 1 Answer

Game Object won't match rotation of new positions transform 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges