Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to use with Unity 2020? #4

Open
RYG81 opened this issue Oct 3, 2023 · 4 comments
Open

Is it possible to use with Unity 2020? #4

RYG81 opened this issue Oct 3, 2023 · 4 comments

Comments

@RYG81
Copy link

RYG81 commented Oct 3, 2023

Hi,

Is it possible to make it work in unity 2020.3?
thanks in advance for your help.
Rahul

@meaf75
Copy link
Owner

meaf75 commented Oct 3, 2023

Due some modern syntax used in the project like Range unary expression and some features from C# 8.0 so a compatibility downgrade should be needed in the code to run it in that version, also the project depends on the package com.unity.modules.uielements:1.0.0 for drawing the editor windows which starts including some useful features starting from Unity 2021.2

So in resume, I guess it's possible but it requires some work

@RYG81
Copy link
Author

RYG81 commented Oct 6, 2023

Are you planning to make it compatible?

@RYG81
Copy link
Author

RYG81 commented Nov 22, 2023

I am trying to use in unity 2020 and getting this error -
Library\PackageCache\com.meaf75.gitnity@2d84bed\Assets\Plugins\GitNity\Editor\GitNity.cs(95,81): error CS8124: Tuple must contain at least two elements.

can you guide what can be done to solve this

@meaf75
Copy link
Owner

meaf75 commented Nov 23, 2023

I'm not planning to make GitNity compatible with Unity 2020, I have other things in mind for the scope of the project like implement Git LFS or Git locks. I'm open to receive any help on make it compatible with older versions of Unity.

In that case ther error that you are receiving

I am trying to use in unity 2020 and getting this error - Library\PackageCache\com.meaf75.gitnity@2d84bed\Assets\Plugins\GitNity\Editor\GitNity.cs(95,81): error CS8124: Tuple must contain at least two elements.

can you guide what can be done to solve this

That's because Unity 2020 uses C# 8 but I used a C# 9 feature named "Target-typed new" (you can solve it by replacing new() with new Dictionary<string, string>()) but errors like that are scattered in multiple places of GitNity, other problem could be the UIElements that would require a refactor to make it compatible with older versions of Unity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants