Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity for generating a large set of images

Discussion in 'Scripting' started by pp_sim, Nov 20, 2020.

  1. pp_sim

    pp_sim

    Joined:
    Sep 29, 2020
    Posts:
    2
    Hi guys,
    in the context of deep neural networks I try to generate a large set of images for training.

    I want to use Unity for this case, but I am not sure how to do it the best way. Maybe you could help me here and answer some of my questions:

    - Can I run "play mode" headless and capture screenhots or do I have to build the scene first?

    If I have to build the scene:
    - Can I change the variables in my scripts when executing the built .exe application? or
    - Can I change the variables in my scripts when building from command line?

    Since I am new to Unity I would be really glad if you could help me or show me a totally different way how I could achieve this task!

    Thanks in advance!

    pp_sim
     
  2. Madgvox

    Madgvox

    Joined:
    Apr 13, 2014
    Posts:
    1,315
    No. You can't run the editor in headless mode.

    Yes, you can inherit environment variables and use them to modify your script's behaviours. https://support.unity.com/hc/en-us/...environment-variable-s-set-how-can-I-do-that-

    Alternatively (probably easier), you can also load a configuration file from a known location and use that.
     
    pp_sim likes this.