Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Solved] Can't access UnityEngine.Timeline from a custom package

Discussion in 'Package Manager' started by SKArctop, Jul 7, 2019.

  1. SKArctop

    SKArctop

    Joined:
    Feb 12, 2018
    Posts:
    38
    I'm having an issue getting my package to compile when I add it to a project in 2019.1

    I have a package that contains classes that provide extended functionally for time line.
    I have added the Timeline package as a dependency, but unity fails to compile my package as it cannot find the UnityEngine.Timeline namespace, although it is present as its own package.

    Any idea on how to solve this issue?

    Edit : I've tried to upgrade the original project I used to create the package to 2019, and the code there won't compile either, seems as if the UnityEngine.Timeline namespace is completely inaccessible even from regular scripts in 2019.1
     
    Last edited: Jul 7, 2019
  2. erick_unity

    erick_unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    41
    hi @sk_unity246, I reached out to the timeline team, they will get in touch here asap.
     
  3. erick_unity

    erick_unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    41
    Alekxss and SKArctop like this.
  4. SKArctop

    SKArctop

    Joined:
    Feb 12, 2018
    Posts:
    38
    Oh that makes sense. I didn't setup the ASMDef file in my own ASMDef. that solved the issue. thank you.

    On a side note, that is a bit of a confusing issue. I assumed that by adding a package as a dependency it will essentially "import" it into my package. The asmdef thing wasn't clear to me. Could be that I missed that in the docs, or it could be that the docs aren't clear on that. This should probably be highlighted more clearly, as more and more people move to use packages in their projects.
     
  5. erick_unity

    erick_unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    41
    Indeed, it is a new concept in Unity, one we could document better.
    In retrospect, what would have been a good place for you to "discover" you had to do that?
     
  6. SKArctop

    SKArctop

    Joined:
    Feb 12, 2018
    Posts:
    38
    I guess in the Concepts page of the packages, or anywhere in the packages section of the manual, perhaps in the dependencies page, under another section?