Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Resolved Remove physics 3d from my 2D project

Discussion in 'Netcode for GameObjects' started by PersianKiller, Feb 1, 2023.

  1. PersianKiller

    PersianKiller

    Joined:
    Jul 16, 2017
    Posts:
    113
    I want to remove physics 3d package but it depends on netcode for gameobjects, but Its a 2D project and I dont need 3d physics , is there any way that I could remove 3d physics?
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,215
    PhysX 3D physics doesn't depend on anything and it isn't a package, it's a built-in module. Those appear in the package manager and you can disable them.

    If you're referring to DOTS 3D physics (which is a package) then you're on the wrong forum which is here.
     
  3. PersianKiller

    PersianKiller

    Joined:
    Jul 16, 2017
    Posts:
    113

    but unity doesn't let me remove it.
     

    Attached Files:

    MelvMay likes this.
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,215
    Right so it's not 3D physics (PhysX) depending on Netcode for GameObjects, it's Netcode depending on 3D Physics. If this is the case then yes, you cannot remove 3D physics just like any dependency.

    It's strange it needs to hard dependency on 3D physics but I've not used it so I presume it directly communicates with Rigidbody rather than Transform hence the dependency.

    I think it's best to move this post to the Netcode forum where you might get more information on the actual dependency and why.
     
    RikuTheFuffs-U and PersianKiller like this.
  5. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    426
    I asked this to the Netcode For GameObject's team. it's pretty werd as the Physics package is not officially a dependency of NGO. I'll come back at you when I have an answer.
     
    PersianKiller likes this.
  6. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    426
  7. PersianKiller

    PersianKiller

    Joined:
    Jul 16, 2017
    Posts:
    113
    Version 1.0.0-pre.6 - March 03, 2022(the first version)
    unity 2020.3.32f1

    and also Netcode for Gameobjects has a component called network transform, it can use Rigidbody to sync your gameobject position between clients, I think thats because you cant remove physics 3d or 2D :)
     
    Last edited: Feb 2, 2023
  8. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    426
    That version is pretty old now, can you try upgrading to the latest NGO? There are plenty of improvements and fixes as the package is no longer in the "preview" state
     
    PersianKiller likes this.
  9. MFatihMAR

    MFatihMAR

    Joined:
    Sep 6, 2020
    Posts:
    2