Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug 2.1.4 : does not contain a definition for 'padding'

Discussion in 'UGUI & TextMesh Pro' started by Mortalanimal, Feb 25, 2021.

  1. Mortalanimal

    Mortalanimal

    Joined:
    Jun 7, 2014
    Posts:
    565
    Hello

    for TMP version 2.1.4

    I get this error on unity versions : 2019.4.5f1 and 2019.4.11f1
    No error was found on unity versions: 2019.4.14f1 and 2019.4.17f1

    all 4 tests where on a fresh project, restarting unity does not remove the bug, and reimporting packages also does not fix the bug

    bug:
    "Library\PackageCache\com.unity.textmeshpro@2.1.4\Scripts\Runtime\TMP_DefaultControls.cs(188,22): error CS1061: 'RectMask2D' does not contain a definition for 'padding' and no accessible extension method 'padding' accepting a first argument of type 'RectMask2D' could be found (are you missing a using directive or an assembly reference?)"
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The padding property was added to the RectMask2D in version 2019.4.14 I believe.

    If you cannot upgrade your project to a newer release of 2019.4, you can always comment out the offending line in the package. This change will need to be done in the Global Package Cache in order to make the change persistent.

    I will revise the compiler conditional in the next release.
     
  3. Mortalanimal

    Mortalanimal

    Joined:
    Jun 7, 2014
    Posts:
    565
    Thank you for response, I just wanted to let you know, I was testing my asset compatibility when I ran into this.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Thanks :)