Search Unity

Ecs Systems Specific To Target Build.

Discussion in 'Entity Component System' started by Opeth001, Apr 12, 2019.

  1. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,117
    I think it's a great idea to add attributes that can be used with systems to specify in which Target builds the system will exist.
    In my case I need some systems to run only when they are in a headless application. Other builds should not even know about them.
     
  2. M_R

    M_R

    Joined:
    Apr 15, 2015
    Posts:
    559
    you can define them in an asmdef with only the desired platform selected, or with define constraints

    or directly surround them with
    #if HEADLESS_APP


    then you add the define(s) when you build
     
  3. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,117
    Oh Thank you !!!
    i didn't know about it.