Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
This question was closed Jun 23, 2016 at 05:49 PM by igorbebkiewicz for the following reason:

The question is answered, right answer was accepted

avatar image
1
Question by igorbebkiewicz · Jun 23, 2016 at 09:56 AM · unity 53dshop

How to change main character model via script?

Hello! I'm looking for some advice how I can change the main character (3d model) in game if for example I buy new model new in in game shop? Can you recomend some tutorials maybe?

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

  • Sort: 
avatar image
0
Best Answer

Answer by TheFloatingSheep · Jun 23, 2016 at 10:19 AM

There's multiple ways. But... What i suggest you do is, instead of just placing the GameObject in the scene window, drag it into your Assets folder, to make it a prefab, and delete it from the scene. Then, make a script with a static variable that instantiates it when the Start function is called. And in the menu where you buy new characters, you can just set the static variable to the prefab of that shop item.

I'm not going into details right now as i don't even know what language you're writing in, but, if you have any questions about how to do this, feel free to ask in a comment.

Comment
Add comment · Show 2 · 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 igorbebkiewicz · Jun 23, 2016 at 10:24 AM 1
Share

What i suggest you do is, ins$$anonymous$$d of just placing the GameObject in the scene window, drag it into your Assets folder, to make it a prefab, and delete it from the scene. Then, make a script with a static variable that instantiates it when the Start function is called. And in the menu where you buy new characters, you can just set the static variable to the prefab of that shop item

Nice idea, Thanks bro. :)

avatar image TheFloatingSheep igorbebkiewicz · Jun 29, 2016 at 06:58 PM 0
Share

No problem. Feel free to click the "accept answer" button xD. It would help with my reputation score.

Follow this Question

Answers Answers and Comments

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

Related Questions

Input Dispatching issue ANR reports in Unity 3D Game on Android platform 0 Answers

How to convert keyboard inputs to Circle Pad with n3ds 0 Answers

Keep an object perpendicular to the surface it collides with and parallel to the floor 0 Answers

How to make Text in canvas disappear on keypress? 2 Answers

Getting 'bouyancy' on water to work. Help! 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