• 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
2
Question by Erica · Feb 18, 2010 at 11:08 PM · gameobject

Making Instatiated GameObjects Permanent

Is there a way to "grab" gameObjects that are instantiated during the game play, and make them "permanent" in the scene (i.e. put them in the hierarchy "for real" so they show up next time you run the game)?

The goal: I'm trying to place trails of animal tracks around on my Terrain. I have the tracks set up as prefabs, basically projectors with 2 paw prints per projector. This means making large looping trails takes a long, long time. I'm pretty sure I can set up my character-controller to leave tracks (place them above the terrain with the characters position/rotation at a given interval) which would make it easy to run around and place the tracks. So, how can I "save" these sets of tracks and place them into my actual game world?

If I can't just save the gameObjects, I suppose I could just write out their positions/rotations to a text file, and instantiate them when the engine starts up. This seems like it might take awhile to load, and would be a pain to adjust if there were a few tracks that didn't look right. Being able to "grab" the objects from the game mode would be easier.

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
2
Best Answer

Answer by Jaap Kreijkamp · Feb 18, 2010 at 11:47 PM

A simple solution is to have the game place the animals under one gameobject (say animals, when ready, pause the game, copy the gameobject animals (Cmd- or Ctrl-C), stop the game and paste the (now disappeared) gameobject back.

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 Erica · Feb 19, 2010 at 03:53 AM 0
Share

I was hoping it would be something that simple. The only problem seems to be that since it's a LOT of tracks it takes a long time to copy and paste.

Thanks!

avatar image Lucas Meijer 1 ♦♦ · Feb 19, 2010 at 10:54 AM 0
Share

you can copy-paste multiple gameobjects

avatar image Frank84 · Jul 03, 2012 at 06:35 PM 0
Share

Wow, what an amazing feature. This just saved me so much time.

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

1 Person is following this question.

avatar image

Related Questions

using Contains(gameObject) to find and destroy a gameObject from a list 2 Answers

Why do Instantiated GameObjects Colliders only work on player i am controlling,nothing else? 2 Answers

How to get a parent object after clicking the childObject 1 Answer

Referencing an Array of Objects 0 Answers

How to sort a array of gameobjects same as hirearcy react 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