FirstGearGames / FishNet

FishNet: Unity Networking Evolved.
Other
1.16k stars 132 forks source link

Physics 2D #613

Open SnaiperoG3D opened 2 months ago

SnaiperoG3D commented 2 months ago

General Unity version: 2022.3.16f1 Fish-Networking version: 4.1.1R Pro Discord link: Not required

Description Disabled Physics2D in Package Manager leads to errors such as: type name could not be found in namespace UnityEngine. PhysicsScene2D, Rigidbody2D, and etc classes which provide Physics2D. Not comfortable with project where only 3D Physics required, i guess same thing can be with project where only 2D Physics are required.

Replication Steps to reproduce the behavior:

  1. Disable Physics2D in Package Manager
  2. See errors

Expected behavior No errors

FirstGearGames commented 1 month ago

I tried this in 2021 and the 'disable' option becomes grayed out, with no option to 'enable'. There's also no errors thrown. Might be a Unity version bug? I'll try on 2022 another time,

FirstGearGames commented 1 month ago

I could not replicate in 2023.3.5f either. I'm still getting the unusual no Enable option. If you can show me where all the errors are though I can probably wrap them in defines.

SnaiperoG3D commented 1 month ago

Your button is gray just because there is a dependency which uses Physics2D, click on Physics2D, open Dependencies and youll see that there is a Tilemap package, which uses Physics2D and enable it automatic, just disable Tilemap package and it will disable force enabled Physics2D package, then you will have errors in Fish. Same process for Physics where 5 dependencies, you need to disable all dependencies, and Physics itself for completelly disable Physics, then you will have same errors for Physics.

PS there is a chain icon on left side of package name, says that package disabled but force enabled because have dependencies.