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 /
avatar image
0
Question by JamesT · Aug 11, 2011 at 05:49 PM · buginspectorcomponent

Possible Bug - Cannot remove script component from game object.

Are there any workarounds for the following?: On a game object when two or more scripts are attached, if I try to remove one of the scripts (from inspector->RemoveComponent), the wrong script gets removed. It is not possible to remove a script that is no longer needed, or (one that was erroneously attached) in cases where more than one script is attached to the game object

Comment
Add comment · Show 5
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 Eric5h5 · Aug 11, 2011 at 06:35 PM 1
Share

I haven't seen anything like that. It would be good if you made a repro case and submitted it using the bug reporter.

avatar image AVividLight · Aug 11, 2011 at 06:39 PM 0
Share

It is possible that one script requires the other... I think it would give you a prompt, though...

avatar image Statement · Aug 11, 2011 at 06:44 PM 0
Share

Is this with Unity 3.4?

avatar image JamesT · Aug 11, 2011 at 07:21 PM 0
Share

It's Unity 3.3 This particular script that I'm wanting to remove is definitely not required. But when I try to remove it, it removes the wrong script. I guess the workaround is to remove all scripts and then add and re-configure the ones needed. It might make a good case indeed. Don't know about the "bug reporter".

avatar image Joshua · Aug 11, 2011 at 08:12 PM 0
Share

Try to reproduce this in as simple a scene as possible and sent in a bug including that scene, like Eric said. (Help > report a bug).

@GBStudios Yes, RequireComponent will simply prompt you that you can't remove it.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by sneftel · Aug 11, 2011 at 08:22 PM

I've seen this happen when a script was renamed while still attached to a GameObject. If I recall correctly, resetting the component first (click the gear on the upper right corner of the component inspector) fixed the problem.

Comment
Add comment · 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
0

Answer by ptr0x · Oct 23, 2015 at 11:19 AM

I ran into the same problem here.

The problem was that all the scripts attached to a game object in unity need to contain a class inheriting from MonoBehaviour. At the moment I attached the script to the game object there was the MonoBehaviour class but after that I removed this function from my IDE, thus causing the problem described for you.

Unfortunatelly I had to delete the game object and then put the components again in it.

Comment
Add comment · 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

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

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

TextMeshPro Not updating Text with Rich Tags Immediately 1 Answer

Custom editor desperation: instance of custom class 1 Answer

How can I link to my docs in a Custom Inspector panel? 3 Answers

Unity Editor's Inspector Glitch while using OnGUI function 0 Answers

Components added programatically - visibility in inspector 1 Answer


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