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

Remove soft dependency on Unity3D.SDK #77

Closed
oliverbooth opened this issue Apr 7, 2023 · 2 comments
Closed

Remove soft dependency on Unity3D.SDK #77

oliverbooth opened this issue Apr 7, 2023 · 2 comments
Assignees
Labels
area-X10D.Unity enhancement New feature or request external Intervention required by external source (e.g .NET update) netstandard2.1 Issue applies to .NET Standard 2.1. rejected This issue has been rejected by the developer upm An issue related to the Unity package, or the upm branch.

Comments

@oliverbooth
Copy link
Owner

oliverbooth commented Apr 7, 2023

X10D.Unity currently soft-references Unity3D.SDK 2021.1.14.1. This NuGet package has not been updated since 11 July 2021, and as such is not getting any new API introduced by 2022 or 2023, making it impossible to create extension methods for newer types.

One possible solution to this would be to create a dummy assembly in the repository that X10D.Unity soft-references, which mirrors the Unity API by defining the types necessary to extend. However, this adds another layer of maintenance that I'm not entirely prepared to do.

While I can reference the Unity assemblies using my local installation while developing, there also needs to be a way for GitHub Actions to have access to the assemblies so that CD can continue to build the X10D.Unity artifacts. There is potential here, as GameCI offers a Unity Docker image which appears to be maintained and updated regularly.

I might be able to tap into this, and create a workflow which pulls the latest Unity Editor and references those assemblies. However failing this, it may also be the case that we simply have to wait until Unity migrates to SDK-style csproj, wherein I can reference Unity assemblies natively without the hassle of introducing new workflows.

Further research is required, and this issue will be placed on the backburner with tangible no milestone for now.

@oliverbooth oliverbooth added enhancement New feature or request backburner Development on hold or low-priority external Intervention required by external source (e.g .NET update) approved This issue has been approved by the developer upm An issue related to the Unity package, or the upm branch. netstandard2.1 Issue applies to .NET Standard 2.1. labels Apr 7, 2023
@oliverbooth oliverbooth self-assigned this Apr 7, 2023
@oliverbooth
Copy link
Owner Author

Unity is planning to upgrade to CoreCLR in the near future, the discussion of which is consistently active and reasonably transparent.

When this time comes, it may be possible to utilise Unity's own libraries as assembly references, or perhaps the X10D.Unity project could be changed to match Unity's new MSBuild integration.

However for the mean time, it may be appropriate to suppress NU1701 to prevent the analyser from the unnecessary warning, since the reference to Unity3D.SDK is a soft dependency, and only referenced privately.

oliverbooth added a commit that referenced this issue Aug 22, 2023
@oliverbooth oliverbooth added rejected This issue has been rejected by the developer and removed backburner Development on hold or low-priority approved This issue has been approved by the developer labels Sep 12, 2023
@oliverbooth
Copy link
Owner Author

Superseded by #86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-X10D.Unity enhancement New feature or request external Intervention required by external source (e.g .NET update) netstandard2.1 Issue applies to .NET Standard 2.1. rejected This issue has been rejected by the developer upm An issue related to the Unity package, or the upm branch.
Projects
None yet
Development

No branches or pull requests

1 participant