• 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 lil_billy · Dec 07, 2012 at 05:18 PM · instantiateprefabprefab changing at runtime

how do i stop instantiate from changing a prefab

hehehe so this is a odd bug from what i understand instantiating prefabs should not change prefabs but it is sort of

so i have a prefab object with a list of prefab objects this list includes its own prefab (so yes it can spawn itself)

now when it spawns, its creations contain many variables and additional objects not assigned in the prefab (but are assigned/generated during runtime)

and this error replicates by generation

if I've seen spawned objects having clones of clones of clones (clone)(clone)(clone)

anyone know anything about this issue

Comment
Add comment · Show 4
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 DoctorWhy · Dec 07, 2012 at 05:48 PM 0
Share

What version of Unity? And where are you instantiating it (Awake, Start, Update, on PostProcess$$anonymous$$odel, etc)?

avatar image lil_billy · Dec 07, 2012 at 08:00 PM 0
Share

the latest v3 pro

instantiation is happening in both an awake and a very heavy coroutine

the coroutine instantiates the main prefab while the awake is instantiating a sub object that is getting replicated by the coroutines instantiation

avatar image lil_billy · Dec 07, 2012 at 08:10 PM 0
Share

I should probably add that its not necessarily changing a prefab but somehow the reference to the prefab is changing, even though I never change it (reference = something never happens)

avatar image lil_billy · Dec 09, 2012 at 04:36 PM 0
Share

update: so i did a fix that hate with passion basically I put an if at the top of an awake that asks if the name is ... clone clone if it is i destroy it immediatly, which ofc throws lots of errors but is unfortunately all i can do because if i let it finish it will cause problems.

FYI still not answered

0 Replies

· Add your reply
  • Sort: 

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

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

10 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

Related Questions

Object spawns itself instead of it's prefab. 3 Answers

Can't set the random position for an Instance. 1 Answer

Error: Instantiated Enemies don't get hit 2 Answers

Player clone not instantiating at the same spot 1 Answer

How to instantiate prefab,Instantiating prefab is not wokring in this script 0 Answers


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