Search Unity

How to use package only in the Editor and not include it in the build?

Discussion in 'Package Manager' started by hromoyDron, Aug 16, 2019.

  1. hromoyDron

    hromoyDron

    Joined:
    Jan 24, 2013
    Posts:
    90
    Hello!

    How I can use package in the Editor and not include it in a build?

    For example I use TimeLine only when I recording video and gifs and not use it in the game build.
    But when I make build I see the TimeLine.dll is included.
     
  2. ethan_jl_unity

    ethan_jl_unity

    Unity Technologies

    Joined:
    Sep 27, 2018
    Posts:
    104
    Hi there,

    Packages can have both Editor and Runtime components. If you take a look at the content of the timeline package, you'll see that it contains both Editor and Runtime scripts. The dll you see is the runtime component of it.

    Therefore if you use a package that only have an editor component and make a build, you should not see any dlls from that package in your build.

    Nevertheless, I'll forward this thread to the corresponding teams and see if there's any mechanism in place that fits your needs.
     
  3. ethan_jl_unity

    ethan_jl_unity

    Unity Technologies

    Joined:
    Sep 27, 2018
    Posts:
    104
  4. iPickle

    iPickle

    Joined:
    Oct 21, 2013
    Posts:
    46
    It sounds like dev dependency in some way
     
  5. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,166
    The problem I face now is some package that can install in UPM is only editor utility. But when we use cloud build it still need to pull those package by the build process. I wish I could specified that some package don't even need to be resolved, especially when it was local package I wrote for convenient but not really get into the runtime or even build process