Skip to content

Syntax error with Unity 2019.4.35f #80

Open

Description

@soelderer

Hello,

I am trying to use bmlTUX with Unity 2019.4.35f. I have enabled .NET 4.x in the project settings. Upon installing the package, I get a syntax error in TuxLog.cs(19,40):

Library\PackageCache\com.biomotionlab.tux@5.0.0\Scripts\Utilities\TuxLog.cs(19,40): error CS1525: Invalid expression term '='

The line is bmlTuxEditorSettings ??= BmlTuxEditorSettings.GetOrCreateSettings();. I suspect it's because the null-coalescing assignment operator was introduced in C# 8.0 if I'm not mistaken.

With 2022.3.59 I don't get the error. Maybe just update the requirements accordingly?

Best regards and thank you for your work!
Paul

Activity

  1. AdamBebko commented on Mar 11, 2025

    @AdamBebko
    Collaborator

    Your analysis is correct. It’s the c# version. It’s been a long time, but I’m pretty sure you can manually bump up the .net version in a project using Unity 2019. So instead of 4x you’d actually specify the higher version that’s higher than the automatically picked one.

  2. AdamBebko commented on Mar 11, 2025

    @AdamBebko
    Collaborator

    Just to note if you really need to use an old version, you can load the package as an embedded package and edit it yourself. To be compatible. Or crate a fork. Hope that helps.

  3. soelderer commented on Mar 12, 2025

    @soelderer
    Author

    Thanks for the quick support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions