• 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 mdm5382 · May 05, 2017 at 04:05 PM · prefabs

Prefabs are Different Size than the Original

Hey so this has never happened to me before, but I'm still new with Unity. I'm creating prefabs. Dragging the prefab into the scene. And the prefab is twice the size as the original.

There was a similar question here, but it was never answered. http://answers.unity3d.com/questions/1304044/gameobject-created-from-prefab-much-larger-than-or.html

Anyone have any idea? Just trying to do a lesson and this is an annoying blocker.

Edit: Just tried it on a new file and I didn't have the issue anymore. Maybe it's a random thing and I just need to start over from the beginning.

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by FM-Productions · May 05, 2017 at 04:47 PM

Hey,

well that is very strange. If it is regular behaviour however, for example the Prefab has always the same variance in size when instantiated, you could simply transform it's local scale. This should work depending on how complex the prefab is. Particle Systems for example may not scale with the parent object scale with default settings.

 float newScale = 0.5f
 GameObject instantiatedObject = Instantiate(prefabReference);
 instantiatedObject.transform.localScale = new Vector3(newScale, newScale, newScale);

It could also be the case that the parent object of your instantiated prefab object is scaled and the prefab object is scaled according to the parent transform scale.

Comment
Add comment · Show 3 · 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
avatar image mdm5382 · May 05, 2017 at 08:33 PM 0
Share

Thanks, but I figured it out. I think it is actually as you said. I attached the 3D object to an empty game object. When I removed the empty game object from the equation everything worked fine.

avatar image pjoshua_m mdm5382 · Jun 06, 2017 at 11:40 AM 0
Share

So does that mean that having an empty game object as it's parent is causing this?

avatar image pjoshua_m mdm5382 · Jun 06, 2017 at 01:38 PM 0
Share

alt text

alt text

screenshot-1185.png (303.1 kB)
screenshot-1186.png (306.0 kB)

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Prefabs losing Material connections after re-opening scenes. Bug? 3 Answers

How to use shared material as my material 0 Answers

Can I make Prefabs that contain other Prefabs? 3 Answers

Making the FPS asset move 1 Answer

One huge mesh or a lots of prefabs 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