Search Unity

Feedback Is it possible to add a Defin that queries Module and Package?

Discussion in 'Package Manager' started by CabinIcarus, Nov 6, 2020.

  1. CabinIcarus

    CabinIcarus

    Joined:
    May 24, 2017
    Posts:
    72
    Some projects use some modules or packages and then the framework encapsulates these modules or packages, but in the new project, the modules may be disabled or the package is not installed. I can't quickly find the package or module definer, I hope to add a web page Explain the defins of modules and packages. Finding Defin wastes too much time.

    upload_2020-11-6_19-41-17.png
     

    Attached Files:

  2. samuelb_unity

    samuelb_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    151
    Hi @CabinIcarus,

    I don't quite understand the question. It sounds like you have used the "Version Defines" feature described here under ("Defining symbols based on project packages") so you have the
    ENABLE_ANIMATION
    define which detects whether the animation package is installed? If that's right, could you elaborate a bit more on what the issue is which is wasting time? Thanks!
     
  3. CabinIcarus

    CabinIcarus

    Joined:
    May 24, 2017
    Posts:
    72
    I just want to know where
    ENABLE_ANIMATION
    Defining symbols can be easily found and other Defining symbols, such as
    ENABLE_PHYSICS
    ,
    ENABLE_UITOOKIT
    , etc., looking for these Defining symbols often wastes a lot of my time, because some projects disable certain modules. So I need to judge the Defining symbols before opening the code
     
  4. samuelb_unity

    samuelb_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    151
    Hi @CabinIcarus,

    I'm afraid I couldn't find any public documentation about these defines. For
    ENABLE_PHYSICS
    , I see this is defined globally in the Unity editor but I didn't find any references to
    ENABLE_ANIMATION
    (I only found
    ENABLE_ANIMATION_MANAGED_JOBS
    ) so I'm not sure where that's coming from. In any case, if these are global defines of the Unity editor, then this isn't strictly a Package Manager-related question. You might have better luck asking in the Editor or Scripting areas of the forum:
    https://forum.unity.com/forums/scripting.12/
    https://forum.unity.com/forums/editor-general-support.10/

    Sorry I couldn't be of more help!
     
  5. CabinIcarus

    CabinIcarus

    Joined:
    May 24, 2017
    Posts:
    72
    Oh thanks, got it