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
6
Question by pavlito · Dec 14, 2015 at 01:50 PM · components

Why are components' script field grayed out?

Components' script field is grayed out making me unable to simply replace the script by drag n dropping. I now manually have to remove the existing script and add a new one.

I tried searching on google with no success. It's not much of a problem, but knowing why it's grayed out would be awesome :) Does anyone know anything?

Notice the champion script field being disabled.

screen.png (31.9 kB)
Comment
Add comment · Show 9
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 Khozo · Dec 14, 2015 at 01:57 PM 1
Share

It's happened in every single project I have in Unity myself after updating to 5.3. The only alternative is to just drag n drop it under the "Add Component" button and removing the original script.

avatar image Dave-Carlile · Dec 14, 2015 at 02:29 PM 0
Share

Yeah, this seems to be a new 5.3 feature. Not sure why yet but I suppose there is some reasoning behind the change. As @$$anonymous$$hozo said, you can just add the new component and remove this one.

avatar image pavlito · Dec 14, 2015 at 03:44 PM 0
Share

There must be a reason. $$anonymous$$aybe it has something to do with Unity being split into several building modules (standalone, ios, android, samsung tv etc) which can be (de)selected during install?

avatar image Bonfire-Boy · Dec 14, 2015 at 03:59 PM 0
Share

So does that mean that you lose values of fields that are common to both scripts, and have to link things up again? I find it a very handy feature that you can change scripts while retaining the values of those fields.

avatar image pavlito Bonfire-Boy · Dec 14, 2015 at 04:01 PM 0
Share

Yes, you lose the references and cannot copy component values when they are not the same type, even if they inherit from the same type

avatar image Tanoshimi2000 · Dec 19, 2015 at 06:24 PM 0
Share

I've tried adding the script manually using AddComponent button, dragging the script over, and everything else I can think of, but it won't let me do anything that changes the script from grayed out to normal.

For reference, I'm converting a project from standard windows to Android. The app works (kinda, the Cardboard prefab to split the view isn't kicking in, although it works in other projects), but the scripts are mostly grayed out.

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
10

Answer by Pharan · Dec 19, 2015 at 08:12 PM

You can un-gray it out (and get the old behavior back) by right-clicking on the Inspector's tab and switching from "Normal" to "Debug".

I guess they assume this is still a useful thing to have, so they kept it there, but disabled it by default to prevent weird stuff.

Given this though, I kinda wish they would've just removed it instead of graying it out, but still be able to highlight/ping the script file when you clicked on the component.

Comment
Add comment · Show 1 · 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 pavlito · Dec 20, 2015 at 12:48 PM 1
Share

Thanks. I just realized this myself. Was about to post it. $$anonymous$$udos, sir.

avatar image
1

Answer by Eric5h5 · Dec 19, 2015 at 06:42 PM

This is because by far most people who changed scripts this way did it accidentally, which creates strange problems. But they recognize that there is a legitimate use for it, and are looking into a way to make it work better.

Comment
Add comment · Show 1 · 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 HalversonS · Jun 15, 2016 at 04:05 PM 0
Share

What other changes were made to how scripts were handled? I'm not seeing anything specific in the patch notes related to this... but since I've updated to 5.3 our C# scripts to not communicate properly with our other applications.

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

39 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

Related Questions

How to add a component to all selected objects? 1 Answer

Import assets, linking their components automaticly. 0 Answers

Destroying Components from Editor Script Throwing MissingReferenceException 1 Answer

Array of usable MonoBehaviour's selected from Project View 0 Answers

Character controller not fitting through door 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