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
1
Question by Jix · Nov 14, 2013 at 07:25 PM · componenthingejoint

enabling and disabling hingeJoint in Unity 4.3

Hinge Joint "enabled" property disappeared in 4.3, is this a joke? How am I supposed to enable/disable this component now? rigidbody's "enabled" property disappeared too...

I know that I can use Destroy() disable it and use AddComponent() to enable it instead of "enabled" property as a workaround but it's a silly workaround. Any ideas?

Funny thing is that hingJoint2D and rigidBody2D has the "enabled" property!

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Julian-Glenn · Nov 14, 2013 at 07:33 PM

Component.Destroy(theComponent); or Destroy(theComponent);

Only way to do it that I can gather from the info provided. It's prolly more efficient to handle it in a script anyhoo?

/julian

Comment
Add comment · Show 4 · 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 Jix · Nov 14, 2013 at 07:41 PM 0
Share

Thanks for the answer but like I said it's not a good solution, it will require to save the component's parameters in (Vector3, int, float..) before destroying the component. Because when I'll be adding it again I need to set these parameters back.

This is unnecessary work on the CPU and wasting memory, I'm doing this on a lot of Objects in the scene and I'm doing it a lot.

avatar image Julian-Glenn · Nov 14, 2013 at 08:17 PM 0
Share

That's they way we all do it. You save information and then you retrieve it. Unless you are working with a Commodore 64 you will be fine. Im assu$$anonymous$$g that all your models are a decent poly count? Saving a Vec3, again, is $$anonymous$$uscule, even in Andriod/iOS.

avatar image Jix · Nov 14, 2013 at 08:27 PM 0
Share

I guess that there is no other option than that... thanks

avatar image Julian-Glenn · Nov 14, 2013 at 08:38 PM 0
Share

It is very $$anonymous$$imal in impact. Same as any engine. That's the way you have to do it. /best of wishes with the game :-)

avatar image
0

Answer by KhaledM · May 29, 2014 at 07:43 PM

another workaround is "active" property, it is marked as Obsolete but it still work in v4.5

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 meat5000 ♦ · May 29, 2014 at 07:43 PM 0
Share

Isnt it simply replaced by SetActive now?

avatar image KhaledM · May 31, 2014 at 06:50 PM 1
Share

There is no SetActive for components

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

19 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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

How to destroy linked components when object is destroyed? 1 Answer

AddComponent() causes a "trying to create a MonoBehaviour using the 'new' keyword" warning 2 Answers

Can someone help me fix my Javascript for Flickering Light? 6 Answers

Reseting Component/GameObject to its initial scene state. 4 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