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 BOOLitGameStudio · May 16, 2013 at 10:04 AM · objectcharacterscreenloadselection

Realtime object loading to scene

Hello all! I'm very new to unity and programing and would like to learn. I'm working on a game that has lots of selecting from inventory.

For example:

GUI character selection. For example I press a button (label BOX) and a box with some animations pops into the scene. And if I dont like the BOX i press the button (label SPHERE) and a spining sphere replaces the box.

Now I understand I need an empty object in the scene where the objects are being loaded and displayed. I still dont know from where the object come from nor do I know how to write the scripts.

If anyone has any idea what I'm talking about and has any suggestions please help me!

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 programmrzinc · May 16, 2013 at 01:34 PM

What I am guessing is that you are trying to load objects during runtime. That is nearly impossible to do without Asset Bundles. What you can do is create a Prefab of both a Sphere and a Cube and then instantiate it like so. You can later make a gameobject active, or make it dissapear. Reply back and I can add a script with detailed instructions

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 BOOLitGameStudio · May 16, 2013 at 02:01 PM 0
Share

Hi, thanks for the answer. Actualy making object invisible isn't the solution I had in $$anonymous$$d. What I need is more like a spawn point. When I select an object in the GUI-inventory that object shows in the viewport.

Another thing about the loading is.... When I select a character in the selection screen that character will be loaded in the level which too is being selected before you actualy start playing.

In short you get to a screen where you select a character and then you select a level (level has a starting spawn point where the selected character is loaded). Then the app loads the ID of the level (in this case a scene) and then the ID of the character (in this point I dont know what maybe a prefab). This is usualy made via database of somesort isn't it?

avatar image programmrzinc · May 16, 2013 at 02:17 PM 0
Share

Add an empty gameobject where you awnt to spawn, and when you want to show the object, set the position to the empty GO's position.

For prefabs, you can just create different characters, and instantiate by the name

avatar image BOOLitGameStudio · May 16, 2013 at 02:23 PM 0
Share

So you need to put every selectable object (character) into a scene if you want a selectable feature?

Can you tell me about asset bundles? If a get that plugin will it help me make this the way I want?

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

14 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

Related Questions

Saving character selection 1 Answer

Switching between multiple classes 2 Answers

Is it possible to keep the same Vector3 value using ScreenToWorldPoint with the camera moving? 0 Answers

How to make a character move towards a side of the screen that's pressed at a constant rate? 2 Answers

Camera doesnt follow selected character 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