Skip to content

Allow setting env vars #61

@krisrok

Description

@krisrok

On some linux distros the Unity Editor starts without display scaling applied, rendering the UI pretty unreadable without a magnifying glass.

It can be fixed by starting the (original) hub with GDK env vars like this:
exec env GDK_SCALE=1 GDK_DPI_SCALE=1.0 "$SCRIPT_DIR/unityhub-bin" "$([[ $UNPRIVILEGED_USERNS_ENABLED == '' || $UNPRIVILEGED_USERNS_ENABLED == 0 ]] && echo '--no-sandbox')" "$@"
(see https://discussions.unity.com/t/no-ui-scaling-for-linux-you-gotta-be-joking/1638248/30 and the whole thread for a lively discussion of this issue)

For UnityHubNative it also kinda works by starting it the same way. It results in tiny UI within the hub itself but the Editor's UI is scaled-up now.

Long story short: If there was a way to set env vars passed to the launched Editor app, it should work great.

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