Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Unity 2018 .NET 4.5+ Support #833

Closed
wants to merge 4 commits into from
Closed

Unity 2018 .NET 4.5+ Support #833

wants to merge 4 commits into from

Conversation

capyvara
Copy link

@capyvara capyvara commented Jun 16, 2018

Allows to compile a Unity 2018 .NET 4.5+ compatible package, as described in #824

Description of the Change

  • Command line builds support an optional extra parameter with the desired framework version (v3.5 or v4.5), ex: ./package.sh /Applications/Unity Release v4.5
  • Package command line build also adds a .netXX to the .unitypackage file name
  • On the IDE you have to manually select the target framework in all the projects
  • Asyncbridge related:
    • The dll and dependencies are taken out of the compilation by MSBuild conditionals inside the project files (AsyncBridge.Net35.dll, ReadOnlyCollectionsInterfaces.dll, System.Threading.dll)
    • Added a wrapper TaskEx.cs files to directly call the system functions
    • Workaround in the package.sh to clean up the .meta out out the .unitypackage

Possible Drawbacks

  • My bootcamp windows is messed up, so:
    • Was tested only on a Mac, Unity 2018.2.0 and 2017.4.5
    • The package.cmd still has two TODO itens to match the functionality with the .sh
  • As mentioned in the issue, Unity don't have a way to keep both target frameworks in the same package so two simultaneous packages will be needed for each release

@StanleyGoldman
Copy link
Contributor

StanleyGoldman commented Jun 16, 2018

Don't stress yourself too much about build.cmd & package.cmd. I was more interested in seeing if I could do than pondering if I should do it. It's a bit of pain to keep them at feature parity. I should remove it because I haven't actively maintained it. It is misleading, as you've encountered. Apologies.

@StanleyGoldman
Copy link
Contributor

And now that you have done work on it, I also feel bad suggesting removing it...
I guess you never expect someone to go into the depths of your build system. 😓

🎖 Kudos though.

@capyvara
Copy link
Author

I'm not stressed about it at all 😄

Actually in the .cmds I just added the 3rd TargetFramework parameter, I've not done the changes once I noticed it was outdated in other features too.

@Swinkid
Copy link

Swinkid commented Jun 19, 2018

Had a quick flick through the code and looks solid.

On the note of not being able to have two versions of the framework in one package - is it worth discussing when you would drop support of 3.5 in the future? I guess the earlier this happens the better in the long run for developers.

@shana
Copy link
Member

shana commented Jul 9, 2018

Thanks for the patch! This isn't forgotten, I found a way to switch between versions depending on which runtime you're on, at least until 2018.3 when hopefully Unity will support configuring that out of the box, so I'll be pulling this in to that fix this week 👍

@capyvara
Copy link
Author

capyvara commented Jul 9, 2018

Oh that's nice, I'm just curious to see how you made that. :)

@capyvara
Copy link
Author

capyvara commented Aug 8, 2018

Any news on this?

@StanleyGoldman
Copy link
Contributor

It should be in the next release. We've been juggling a few projects and had to get the authentication fixes in this release taken care of first. Hang in there please.

@shana
Copy link
Member

shana commented Aug 17, 2018

Ok so I figured out the way to do a side by side ship of both profiles in Unity, which is #889. It doesn't require any changes to the build scripts, it's just shipping 4.6 versions of some dlls and a loader to switch between them. This should Just Work(tm)

@shana
Copy link
Member

shana commented Aug 17, 2018

@capyvara I'll close this one out for now and get a test build for #889 going so you can test it out and see if anything fails.

@shana
Copy link
Member

shana commented Aug 17, 2018

@shana shana closed this Aug 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants