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 Xavier78 · Feb 24, 2019 at 10:01 PM · editorcompilercompilefocus

How do you have the editor compile script in background.

So my question is how do you have the editor compile while in the background(not focused). Right now I have a large project that takes a few seconds to compile, so when I save a script unity will only start compiling when I click into the editor again. Usually there is a second of it looking for changes, then it freezes to compile for 2-3 seconds. I have a good computer so there would be no impact on me if unity keeps checking for this while I am in visual studios.

Comment
Add comment · Show 2
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 Xavier78 · Feb 26, 2019 at 04:21 AM 0
Share

I still haven't figured this out, but there are a few things I found that make it compile faster. Get rid of any warning messages that show about scripts(as the log function takes a while to complete, I was getting 48 warnings from a specific plugin the project was using), also getting rid of unused using references seemed to help maybe? I know the compiler usually gets rid of these, so maybe that step was taking some extra time.

avatar image Captain_Pineapple · Feb 26, 2019 at 11:55 AM 0
Share

I think @Warmedx$$anonymous$$ints is right. there is nothing really to do about this speed. And 2-3 seconds seems fine to me. Have the same issue since the project is getting large. Could be worse i guess :D

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by WarmedxMints · Feb 26, 2019 at 07:56 AM

There isn't really much you can do I believe. One option with a large project is if you have a section of code or namespace that will never change, compile it into a dll. Other than that, I don't believe there is a way to get Unity to compile in the background.

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
-1

Answer by Lynkfox · Feb 24, 2019 at 11:43 PM

I'm not exactly sure of the answer to your question, but if your script is that large, consider breaking it up.

Make a master class that contains most of the methods you would use, then make a smaller script that inherits from that master class so you can use the methods. But that script only does one or two things. That way you only have to compile the smaller script, the master class being inherited from is already ready.

My general understanding of unity is if your script is that big, then you are probably doing things in it that would be better done with the various assets. You can script animation for instance, but there is also an animator. You can script all your camera movements, but there is also an asset that does great camera control, through the editor ( Cinemachine and it's free). Setting up a UI? Look into doozy or another UI asset.

Yes, scripts can do it all. Learning to use the tools already provided / available however will get you to a much better place as a unity developer.

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 Xavier78 · Feb 25, 2019 at 01:16 AM 0
Share

It is not that there is a single large script. I think it's because the project is so large with many scripts that it takes a while to figure out which scripts to compile. Also maybe the first pause is from unity going through other checks before getting to the compiling part. I am a professional unity developer for over 8 years now. What I am doing is custom solutions for companies, so most of the pre-built resource are not specific enough for their needs, or are slower because they have to cover a larger use case. Though of course I do use ones like leantween or others, but that advice was not needed here.

avatar image Lynkfox Xavier78 · Feb 25, 2019 at 03:24 AM 0
Share

fair enough. I misjudged the indication that it was one script, as opposed to many.

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

135 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 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 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 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

Disabling auto-refresh not working 0 Answers

Temp Project Folder In Ramdisk Error 0 Answers

Start uncompiled application with parameters (in Editor) 1 Answer

Prevent Unity window from getting focus upon Play 0 Answers

Failed to compile Java code to DEX; Invalid command dx 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