• 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 WilliamJung · May 02, 2014 at 03:14 PM · prefabs

How I can attach Object to Prefab

I draged and dropped Cube_A, like capture1, into Prefab expecting that Prefab directory will include Cube_A, but Prefabs name is changed as capture3. I have tried many times, but still don't find solution. Please help me.

capture1.png (19.8 kB)
capture3.png (20.7 kB)
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

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Owen-Reynolds · May 02, 2014 at 08:30 PM

You can't rearrange children of a prefab directly. Don't think you can even rename them. All you can do is replace the whole thing, but there is a trick:

To make major changes to a prefab: drag the prefab into your scene, to get a copy you can play with. Make any changes there. It might say "losing prefab connection" when you change children -- just click OK. Then drag that copy back to the prefab. The prefab should immediately "update" with those changes. (Then delete the copy.)

If you gave it a different main parent, then dragging back will warn you "possibly unwanted prefab replacement." Usually that means you messed up, and dragged into the wrong place, but in this case its fine -- just double-checking you really want a new parent.

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
avatar image
0

Answer by Gruffy · May 02, 2014 at 03:36 PM

Hey bud, im not entirely sure as to what you are trying to achieve here exactly, but....

The image in capture 3 denotes you have created a prefab in the project window and then dragged in your Cube_A to it.

Instead, delete everything in your scene and then create your cube object, after you have created your cube object, drag it, from the hierarchy window down in to your Project/ Assets window, you will see it turn blue in the hierarchy panel and it is now considered a prefab in your project. if you want to create a prefab object that holds your cube object, then what you have already done is correct.... If you just want to prefab the actual Cube object , simply drag that into the project panel, not into a prefab you created first as it will become a child of that prefab rather than a self contained entity of its own(having no parented object to sit inside)

Comment
Add comment · Show 1 · 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 WilliamJung · May 03, 2014 at 01:20 AM 0
Share

Thank you for your kind answer. I created a folder in Projet/Assets and renamed as 'Prefabs' and draged and droped cube that I created and get the result that I want. I am wondering what is the defference 'Folder' and 'NewPrefab'. I will try to find it. Anyway, thank you again.

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

22 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 avatar image avatar image avatar image avatar image avatar image

Related Questions

Problems assigning sprite's images 1 Answer

SetActive true not working on UI object 2 Answers

Is there a way or an asset for managing assets that make up a prefab? 0 Answers

Best Way To Reference Instantiated Prefabs with Each Other. 0 Answers

Memory Game Question 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