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 Olafson · Apr 01, 2013 at 08:22 PM · prefabmodelsreplace

Turning Models/Meshes into Prefabs

Hello there.

I have two objects. One Fence Prefab and one Fence Mesh/Model. Obviously, I would usually use the prefab in my scene.

Now, I accidentally dropped the model into the scene, did not notice it, and multiplied it several hundred times. I wanted to change my prefab, but after changing, I noticed that all the fences in my scene are models and not prefabs. That is not really ideal.

Is there any way to turn the fence model into a prefab? I already tried dragging and dropping one of the fences from the Hierachy into the Project view, but that only made that one fence model into a prefab. All the other copies of that fence are still models.

I would really like to find a way to just turn the fence model used in the scene into a prefab, so I do not have to completely rebuild the scene...

Thanks in advance, I hope that it is somehow fixable.

My English is not the best, nor do I know how to explain this properly. If you have any questions, please feel free to ask.

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 iwaldrop · Apr 01, 2013 at 08:45 PM

There are some tools you could use out there, and you could also write your own simple script to do it.

Just do a foreach over all GameObjects that match your selected game object. Store it's Transform information, destroy the original, and instantiate the prefab in it's place.

Otherwise, if you can't find a 'replace all' tool, or can't write a simple (I'm talking like 10 line max) editor script that does it for you, then you'll have to do it by hand. Lesson learned, huh?

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 Olafson · Apr 01, 2013 at 08:57 PM 0
Share

Yeh. I guess that will do. :) Did not think that of that simple solution. Thanks alot! And yes, definetly learned a lesson here. Already restructured my Project folders, so it wont happen agai

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

11 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

Related Questions

Replacing empty gameobjects with prefabs 3 Answers

I accidentally deleted the prefab for objects in my scene. Is it possible to attach those objects to a new instance of the prefab? 1 Answer

Making of mercury,water models in unity 3d? 0 Answers

!! - Just REPLACED One Of My Prefabs - How Do I Get Original Back? - !! 1 Answer

SOLVED - String replace % with " in C# 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