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
1
Question by StormChaserRene · Sep 07, 2017 at 10:35 AM · compilingcommand line

Compile Scripts with Command Line

Hey Guys, I'm trying to get my head around how I can recompile my scripts using a command line. Most of the time I'm working in my IDE and I'm only opening Unity to see if the scripts are compiling without errors. Is it possible to recompile without opening Unity at all or maybe just keeping Unity minimized in the background? I read the manual about Command line arguments (https://docs.unity3d.com/Manual/CommandLineArguments.html), but couldn't find anything about compiling - just building. Greetings

Comment
Add comment · Show 3
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 FortisVenaliter · Sep 07, 2017 at 06:48 PM 0
Share

Why can't you just build normally? I do that all the time in VS. Unity will build over it when you tab in, but at least it will pull up the error list as you expect.

avatar image hexagonius · Sep 08, 2017 at 05:50 AM 0
Share

Let's think about it. Compiling with command-line needs a command window, or at least a batch file you need to start with. Since you'd be interested in error messages, you'd be interested in the command window. With unity, that's just Alt + Tab and the errors will be right there.
So where is the benefit again?

avatar image StormChaserRene · Sep 08, 2017 at 08:05 AM 0
Share

The best would be to see the output of the Unity console in the console of my ID$$anonymous$$ It's possible to call external programs from the IDE with just command lines and with the -batchmode Argument Unity will send logs to the caller. The benefit is to not switch all the time between multiple windows and just push a shortcut inside the ID$$anonymous$$ All the time switching to Unity and back is unnecessary time wasting. A build of the game would take a huge amount of time, especially when there are no errors. I only want to see that everything is fine so why should I do a full build of it.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by FlaSh-G · Sep 08, 2017 at 09:20 AM

As you know, Unity compiles scripts once it's started and focused, if it notices a change in the codebase.

Thus, it is probably enough to call it with -batchmode -quit.

Problem is, you're booting up Unity every time you do this, adding a ****ton of unnecessary time to your compilation. Giving focus to an already opened Unity editor is probably way faster. Maybe you could do that via command line.

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 StormChaserRene · Sep 08, 2017 at 09:26 AM 0
Share

Good point. It's not a big problem to open the current Unity process and $$anonymous$$imize it immediately, for example with AutoHotkey, but then I also don't see the Console Output in my ID$$anonymous$$

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

70 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

Related Questions

Error Building Player using Strip Assemblies 2 Answers

XCode Errors: "_AVCaptureSession" - Unity 3.5 compile problems? 2 Answers

Error:Windows-1252' not supported 1 Answer

How do I check for errors in Visual Studio 1 Answer

building IPA with command line (missing scheme) 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