FirstGearGames / FishNet

FishNet: Unity Networking Evolved.
Other
1.38k stars 149 forks source link

Specify built-in module dependencies in package.json #719

Closed Alexejhero closed 3 months ago

Alexejhero commented 4 months ago

These can also be disabled and if they are, fishnet cannot compile.

While some of these aren't used by fishnet directly, they're used by GameKit.

FirstGearGames commented 3 months ago

How are you replicating the compile error by these not being included?

Alexejhero commented 3 months ago

Opening the package manager and going to the Built-in tab, you can disable Unity's built in modules.

If these are disabled, FishNet (or I guess gamekit) will have compilation errors:

image

By adding these dependencies to the package.json file they will be enabled implicitly even if they were disabled in the project previously.

Packages in the Unity registry do the same thing, where they have references to built-in modules:

image

(Also com.unity.ugui was missing and that is not a built-in module)

FirstGearGames commented 3 months ago

I'm going to update the scripts in the gamekit folder to only be active if specifically using GameKit (another tool I have). Those dependencies shouldn't exist in the first place otherwise.

FirstGearGames commented 3 months ago

Although I originally planned to update the scripts with defines I see that other various parts of FN require some of the extensions, more than I recalled. I'm going to push your PR through, thank you!