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 4u2fap · Feb 28, 2014 at 03:58 AM · javascriptweaponswitch

best way to weapon swapping

well this may sound like a stupid question but i am making a weapon switching system and i want to know what is the best way to do it. so far i looked and all i see is 2 ways of doing it. the first one is having all the weapon already attach to the player and enabling them one at a time depending on the weapon needed but i dont think that is what i want since there will be 100+ guns. the other way i know of is by instantiating the weapon needed as a child of the camera using an array . so i want to know if using an array is really the best way of weapon swapping or are there better ways of doing it ?

thank you for the time you took to answer my question it is very appreciated.

P.S.: please note that i am not asking for codes, all i want is an explanation on the best way to do it and why.

Comment
Add comment · Show 7
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 OSG · Feb 28, 2014 at 05:25 AM 0
Share

Wow, 100+ guns? Are they generating procedurally or there are 100 absolutely different guns with different models?

avatar image 4u2fap · Feb 28, 2014 at 06:16 AM 0
Share

100+ different gun with diffrent models

avatar image OSG · Feb 28, 2014 at 06:24 AM 0
Share

How players will swap weapons? By special menu or by scrolling mouse wheel(pressing special button)? I mean, how much time you have between two swappings?

avatar image 4u2fap · Feb 28, 2014 at 07:11 AM 0
Share

$$anonymous$$y player will only have a maximum of 9 weapon switchebale weapon

avatar image OSG · Feb 28, 2014 at 07:28 AM 0
Share

So why don't you want to have instantiated 9 switchable weapons attached to mainCamera and enable only that you need? Use 2 arrays. One for switchable weapons and other for others. When you need to put into first array new gun just destroy old one and instantiate new. Hope my advice will help you :)

Show more comments

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.

Follow this Question

Answers Answers and Comments

22 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

Related Questions

Weapon pick up and switching script 2 Answers

Why doesn't this weapon switching script work 1 Answer

Cycling through enum with key press 1 Answer

Weapon Switch Animations 1 Answer

Weapon swapping in-game 2 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