Skip to content

Incorrect use of UNITY_SERVER causes Mirror code to compile without Mirror #18

@tinh98

Description

@tinh98

#if (MIRROR || UNITY_SERVER) && !FISHNET

https://github.com/Metater/MetaVoiceChat/blob/main/NetProviders/Mirror/MirrorNetProvider.cs#L1
https://github.com/Metater/MetaVoiceChat/blob/main/NetProviders/Mirror/MirrorFrame.cs#L1

UNITY_SERVER is only a flag for headless server builds, it does not imply Mirror. Using (MIRROR || UNITY_SERVER) wrongly includes Mirror code even if neither Mirror nor FishNet are used (e.g. when using another networking provider), causing compile errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions