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 markuskir · Feb 17, 2020 at 02:41 PM · headlessterminal

Help launching headless application?

Hey, I'm trying to do something that I assume is pretty basic - create a barebones Unity application and launch it in headless mode (server build) on OSX. Unfortunately, I'm pretty lost.

I have a new Unity (2019.2.2f1) file with a single game object in the scene, which has a script attached:

 public class test : MonoBehaviour {
     void Start() {
         Check();
     }
     void Check() {
         if (Application.isBatchMode) {
             Debug.Log("In BatchMode");
         } else {
             Debug.Log("not in batch mode");
         }
     }
 }




This works fine when running in Unity, and after building it as a Server Build targeted at Mac OX X, I have an .app file. The problem is, I'm not sure where to go from here. How do I actually run this file? And what should I expect as a result? Things I've tried:

  • Double clicking on the file... it'll launch, go into not responding mode, and close after a while

  • Running "open testbuild.app" from the terminal, same result

  • While Googling, I found the command line arguments. The first one simply opens Unity Hub; I'm not sure how you'd go about opening a specific Unity file. "testbuild.app --batchmode" and "testbuild --batchmode" return "command not found."

  • Following the steps here, I ran "chmod 755 testbuild.app" and then "./testbuild -batchmode", but got back an error saying that testbuild.app is a directory.

    To make matters tougher, I'm not sure what kind of output I am expecting. I read that headless builds will save output in the Log files, but I didn't see anything relevant there.

    I really appreciate the help. I've been trying to figure this out all day but haven't really made any progress.

    Thanks in advance!

    P.S. my overall goal is to eventually build a server that I can deploy on a VPS. After I get this working, My next step is launching a server when headless mode is detected.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by markuskir · Feb 18, 2020 at 09:29 PM

Quick update in case anyone ends up stumbling across this in the future. It turns out that you had to right click on the file, select "Show package contents," locate the file under Contents > MacOS, and drag the executable file into the terminal.

Also, Debug.Log apparently won't work for logging messages to the terminal. A better solution would be to write an application that issues commands to the running server.

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

120 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

Related Questions

Optimizing Headless Servers 2 Answers

"Timeout occured while trying to update license." in headless build (Fedora Linux/Jenkins) 2 Answers

Apple Mac Store Steps, stuck on Terminal conversion of UnityPlayer.iconset **Unsupported Format Error** 0 Answers

How to write headless server 1 Answer

Unity Test Runner batchmode error. Failed to activate/update license. Timeout occured while trying to update license. 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