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 /
avatar image
0
Question by Vyn_Halcyon · Aug 03, 2016 at 02:00 PM · scripting problemeditor

Is there a way to suspend/toggle a script on and off, to avoid compiler errors in the meantime?

Whenever I update a script-heavy asset, all hell breaks loose. Scripts start missing references left and right. Missing namespaces front and back.

But in order for an update to "run it's course" the editor has to fully load. But the editor doesn't load fully when there's a compiler error. So it's a devil's cycle.

This could be fixed if I could somehow just temporarily "suspend" the affected scripts, and let the editor load up. Then I either fix the scripts manually then "unsuspend" the script to have it compile correctly, or the update implements missing namespaces/dictionaries/whatever-the-stuff-is-called-that-you-type-at-the-very-top-of-the-script, and the script runs again.

Is there an asset/ technique that people use to manage this sort of scenario?

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

Answer by Vyn_Halcyon · Aug 07, 2016 at 01:08 PM

I guess not.

I read somewhere that adding a "." prefix to a Unity Asset Folder hides it. But this method will require having explorer open on the second monitor to undo the hiding via folder rename.

Wonder if there is a better alternative.

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 Glurth · Aug 07, 2016 at 03:48 PM

I realize this is not great answer, but since I don't see any others:

Assuming your script is a component on an object, you can click it in the inspector to disable it.

If you have MANY such components, I would go into the script an manually remark out the code I want excluded, leaving the class itself, in place (to avoid missing references).

Oh, here is an alternative I just though of, but have never tested: you could add in this code to the script when you want i disabled.

 OnEnable()
 {
    this.enabled=false;
 }
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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

The variables modified in the inspector are not kept on build 0 Answers

Custom inspector. Pick one bool from a list. 1 Answer

After Build Scripts no longer functioning in build or editor 1 Answer

Setting GameObject properties in editor when public script fields are changed 2 Answers

Parts of code only execute when there is a Debug.Log() statement in them. Why? 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