Search Unity

Script Defines Tool [RELEASED]

Discussion in 'Assets and Asset Store' started by beck, Feb 1, 2015.

  1. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294

    Have you ever tried to use the built-in script defines functionality in Unity? Did you stop using it because it was too cumbersome?

    Luckily Unity exposes this stuff in their Editor API, so I took the liberty of creating a Script Defines Tool that allows you to interact with this functionality in a much more user friendly way.



    Using Script Defines in Unity can give you a ton of programming power. Compiler directives allow you to custom-tailor your compiled code for various environments by assigning definitions, and conditionally including or excluding code based on them. This tool allows you to quickly and easily set up definitions, and maintain multiple definition profiles.


    This tool has support for saving profiles. Profiles let you define a set of definitions that make sense for different contexts. The most common example is different build types: some definitions should only be present when making Debug builds, and others only when in Release Mode.

    The Script Defines Tool also provides a user-friendly way to select which platforms a given definition is present on:


    This tool is released on the asset store with version 1.0 and is on sale for $15.

    Asset Store Link
     
    Last edited: Feb 5, 2015
    starikcetin likes this.
  2. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    I love it and I need it.
     
  3. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Alright folks, this tool is out on the asset store! I've updated the original post, and check out the asset store link here!
     
  4. Eric-van-Gastel

    Eric-van-Gastel

    Joined:
    Jan 2, 2016
    Posts:
    21
    It seems there is a limit to how many symbols you can add. If you add too many, the last few are ignored by the preprocessor, and your code won't compile. I'm in a situation where I need a lot of scripting define symbols, but haven't found a solution yet.

    Did anyone encounter this before?