Search Unity

Version Defines in Assembly Definition inside a Package not working

Discussion in 'Scripting' started by hk1ll3r, Aug 18, 2021.

  1. hk1ll3r

    hk1ll3r

    Joined:
    Sep 13, 2018
    Posts:
    88
    I have a package which depends on textmeshpro. I need a symbol defined for older versions of textmeshpro to make my package work with those old versions since textmeshpro's structure and classes have changed.

    In my assembly definition I put a version define with my symbol name and the textmeshpro version I'm interested in.

    This works if my scripts are under my Assets folder e.g. when I am developing the package. Once I import the package from UPM in a new project, the symbol is not defined and the package compiles as if the version define did not exist.

    Is this the expected behavior? Is the "version defines" feature of assembly definitions only for project assembly definitions? The documentation is not clear on this.
     
    Claytonious likes this.
  2. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    902
    Having the same problem from a package. Did you ever solve it?
     
  3. hk1ll3r

    hk1ll3r

    Joined:
    Sep 13, 2018
    Posts:
    88
    I think this resolved as I updated my Unity Editor. I know it works now.
     
    Claytonious likes this.