Search Unity

  1. Tune in to get all the latest Unity news live from Berlin on June 19, 6pm CEST. Set up a YouTube reminder!
    Dismiss Notice
  2. Unity 2018.1 has arrived! Read about it here
    Dismiss Notice
  3. Scriptable Render Pipeline improvements, Texture Mipmap Streaming, and more! Check out what we have in store for you in the 2018.2 Beta.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  5. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  6. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

New to Unity 2018.1 - Package Manager

Discussion in 'Cinemachine' started by Adam_Myhill, Mar 9, 2018.

  1. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    297
    Those of you on the 2018.1 betas may have noticed a new huge feature: Package Manager

    upload_2018-3-8_16-27-12.png

    This is where many Unity Packages will be held and it's where the latest version of CM is being delivered
    upload_2018-3-8_16-28-20.png

    Cinemachine will still live on the Asset Store, at least for a while, but will no longer be updated there ending with version 2.1.10. The latest versions of CM will now be delivered via the Package Manager.

    You can see there's already been two CM updates with improvements and new features from what's currently on the Asset Store.

    Over time, more and more Unity systems will move here as it allows us to update each module/package more frequently than through Unity mainline. It also allows people to configure lighter installs of Unity with just the packages needed for any given type of project.

    Thanks a bunch!
     

    Attached Files:

    Corvwyn, discofhc and JakubSmaga like this.
  2. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    297
    Also, there's a pretty big new feature in there. We're announcing the release at GDC... but I can't stop you from having a mess around if you find it.... Look under 'Extensions' for any vcam
     
    hippocoder likes this.
  3. TehReason

    TehReason

    Joined:
    May 14, 2013
    Posts:
    49
    Whats the best way to set this up with assembly definitions?
    Especially as the Postprocessing Adaptor would require the dependency as well if we want to clean up our project folder.

    Also another thing i would like to mention, its currently quite hard to change the input adapter for the freelook camera (in case you dont want to use unity input). You cant easily copy the whole content of the freelook camera script as most of the functions required a marked internal for Cinemachine. And even after changing those methods to public your missing the custom editor functionality to change all of the 3 subcam properties for the freelook camera.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,193
    Actually it's very easy. No code copying required. Look in CinemachineCore for the input override delegate.
     
  5. TehReason

    TehReason

    Joined:
    May 14, 2013
    Posts:
    49
    ouh nice, awesome havent seen this :)

    Also could you tell me the exact name of the cinemachine assembly to setup my dependencies? I would expect something like Unity.Cinemachine?
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,193
    Assemblies are "Cinemachine" and "Cinemachine.Editor"
     
  7. sebsmax

    sebsmax

    Joined:
    Sep 8, 2015
    Posts:
    59
    I've tried it, here what i got:

    • migrating to this version break all the cameras in the project
    • in the new package manager, the Cinemachine 2.1.10 install was not detected, So and I had to make a new install and then the console was spawning error everywhere as two Cinemachine were in the project.
    • In the project, when doing "Edit script", it lead to a broken script
    • I realized that it's possible to find the source code in C:\ProgramData\Unity\cache\packages\packages.unity.com\com.unity.cinemachine@2.1.12\Runtime\Behaviours

    Also that's a minor issue, in the doc you have faulty characters "�����" everywhere
    https://docs.unity3d.com/Packages/com.unity.cinemachine@2.1/manual/index.html
     
    Last edited: Mar 18, 2018
  8. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    1,569
    how about a small thumbnail for each package in the list?
     
  9. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,193
    Thanks for the feedback. You can upgrade without breaking all your cameras if you do it this way:
    1. First delete the Cinemachine package from your project
    2. Then install Cinemachine from the package manager
    This is because Package Manager CM re-uses the same metafile IDs, specifically in order not to break existing projects. If you install the package manager version without first deleting the old install, all the metafile IDs will get remapped, and the result is what you got.

    And thanks for the note about the manual. It seems that all the apostrophes got mangled somewhere in the pipeline. We'll look into it.
     
    Last edited: Mar 18, 2018
    el_boogie and tnaseem like this.
  10. sebsmax

    sebsmax

    Joined:
    Sep 8, 2015
    Posts:
    59
    As consoles plugins don't support 2018.1 yet, I need to stay on unity 2017.3 for now. So in the end, I just took the install of Cinemachine 2.1.12 and moved it in my Unity 2017.3 project.

    It work just fine!
     
  11. zhuxianzhi

    zhuxianzhi

    Joined:
    Mar 30, 2015
    Posts:
    6

    hi,sebsmax.

    I try to use your way, edit mode works, but not build? Any solution? Thanks in advance.

    Error:
    ArgumentException: The Assembly UnityEditor is referenced by Cinemachine ('Assets/Plugins/Cinemachine.dll'). But the dll is not allowed to be included or could not be found.
     
  12. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    13
    I installed Posprocessing v2 via Package Manager and then Cinemachine. But I can't fond the CinemachinePostProcessing component. What should I do to get it back?
     
  13. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,193
  14. Alexsandro-Natsume

    Alexsandro-Natsume

    Joined:
    Apr 20, 2015
    Posts:
    11
    for those who are using a older version of unity but are having a problem with cinemachine.
    what are we suppose to do?
     
  15. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,193
    Ask here on the forum about your problem, we will try to help!
     
  16. Alexsandro-Natsume

    Alexsandro-Natsume

    Joined:
    Apr 20, 2015
    Posts:
    11
    when my camera with the cinemachine collider component hit a wall , my character with character controller stop
    colliding with the world and fall from terrain .
     
  17. Alexsandro-Natsume

    Alexsandro-Natsume

    Joined:
    Apr 20, 2015
    Posts:
    11
    im having this problem with nintendo switch only
     
  18. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,193
    Hmmm... there is a known issue with CM 2.1.10 relating to colliders not working properly in some builds. Haven't seen it on Switch before, but there's a good chance that it's your culprit. Here is a patch you can try:

    Find CinemachineCollider.cs, and replace the RespectCameraRadius() method with this:
    Code (CSharp):
    1.         private Vector3 RespectCameraRadius(Vector3 cameraPos)
    2.         {
    3.             Vector3 result = Vector3.zero;
    4.             int numObstacles = Physics.OverlapSphereNonAlloc(
    5.                 cameraPos, m_CameraRadius, mColliderBuffer,
    6.                 m_CollideAgainst, QueryTriggerInteraction.Ignore);
    7.             if (numObstacles > 0)
    8.             {
    9.                 if (mCameraColliderGameObject == null)
    10.                 {
    11.                     mCameraColliderGameObject = new GameObject("CinemachineCollider Collider");
    12.                     mCameraColliderGameObject.hideFlags = HideFlags.HideAndDontSave;
    13.                     mCameraColliderGameObject.transform.position = Vector3.zero;
    14.                     mCameraColliderGameObject.SetActive(true);
    15.                     mCameraCollider = mCameraColliderGameObject.AddComponent<SphereCollider>();
    16.                     var rb = mCameraColliderGameObject.AddComponent<Rigidbody>();
    17.                     rb.detectCollisions = false;
    18.                     rb.isKinematic = true;
    19.                 }
    20.                 mCameraCollider.radius = m_CameraRadius;
    21.                 for (int i = 0; i < numObstacles; ++i)
    22.                 {
    23.                     Collider c = mColliderBuffer[i];
    24.                     if (m_IgnoreTag.Length > 0 && c.CompareTag(m_IgnoreTag))
    25.                         continue;
    26.                     Vector3 dir;
    27.                     float distance;
    28.                     if (Physics.ComputePenetration(
    29.                         mCameraCollider, cameraPos, Quaternion.identity,
    30.                         c, c.transform.position, c.transform.rotation,
    31.                         out dir, out distance))
    32.                     {
    33.                         result += dir * distance;   // naive, but maybe enough
    34.                     }
    35.                 }
    36.             }
    37.             return result;
    38.         }
    Let me know how this works for you.
     
  19. Alexsandro-Natsume

    Alexsandro-Natsume

    Joined:
    Apr 20, 2015
    Posts:
    11
    from a simple test scene looks like the problem its gone , Thank you!.
    can you explain me what was causing this problem?
     
  20. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,193
    The NaN positions were breaking the physics system, but only on some platforms
     
  21. Alexsandro-Natsume

    Alexsandro-Natsume

    Joined:
    Apr 20, 2015
    Posts:
    11
    so if it hit anything the whole system break?
     
  22. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,193
    possibly, yes
     
  23. Alexsandro-Natsume

    Alexsandro-Natsume

    Joined:
    Apr 20, 2015
    Posts:
    11
    lol! i solved my problem , thank you very much!
     
    Gregoryl likes this.
  24. Meatgrind

    Meatgrind

    Joined:
    Jul 12, 2012
    Posts:
    38
    Hi! Cinemachine 2.2.0 Unity Package Manager release is broken.

    I'm migrating from the last Asset Store version to the Package Manager Cinemachine 2.2.0 and every camera and virtual camera object in every scene of my project now has a "Missing MonoBehaviour".

    I figured out the missing reference was previously CinemachinePostFX, a component that is no longer present in the default setup of Cinemachine as of a few versions back. The documentation and many forum posts advise that you have split that component as part of a separate Adaptor package for integrating Cinemachine with Unity PostProcessing Stack, and have two Adaptors for V1 (Asset Store, legacy) and V2 (Package Manager, previously on GitHub) of the PostProcessing Stack.

    Cinemachine 2.2.0 release on Unity Package Manager is missing the unitypackage for PostProcessing Stack V1 Adaptor, and even the Cinemachine MenuItem in Unity Editor shows only the "Import Post Processing V2 Adaptor Asset Package" option and nothing for V1. The Editor menu missing V1 can be seen in a screenshot by @Gregoryl at a relevant issue post here on the forums ("Cinemachine Post Fx Missing").