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

Support 2020.2 #6

Closed
mob-sakai opened this issue Nov 2, 2020 · 12 comments
Closed

Support 2020.2 #6

mob-sakai opened this issue Nov 2, 2020 · 12 comments
Assignees
Labels
enhancement New feature or request released

Comments

@mob-sakai
Copy link
Owner

No description provided.

@mob-sakai mob-sakai added the enhancement New feature or request label Nov 2, 2020
@mob-sakai mob-sakai self-assigned this Nov 2, 2020
mob-sakai added a commit that referenced this issue Nov 7, 2020
github-actions bot pushed a commit that referenced this issue Nov 9, 2020
# [1.3.0](1.2.0...1.3.0) (2020-11-09)

### Bug Fixes

* support Unity 2020.2 or later ([181ea58](181ea58)), closes [#6](#6) [#7](#7)
* when enabling C# Settings in asmdef inspector, edits are lost ([0d86d20](0d86d20))

### Features

* support all nullable settings ([789edaf](789edaf)), closes [#8](#8)
@github-actions
Copy link

github-actions bot commented Nov 9, 2020

🎉 This issue has been resolved in version 1.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@VolodymyrBS
Copy link

I just try upgrade my C#9 test project to Unity 2020.2.0b11 and it's says that I have compilation errors and show safe mode pop-up.
If I click "Ignore" it start compiling by compiler that I choose (in my case Microsoft.Net.compiler.Toolset 3.8.0).
If I chose enter safe mode it shows c# 9 syntax features as error.
also it fails if I start build in batch mode.

did I miss something?

@mob-sakai mob-sakai reopened this Nov 18, 2020
@mob-sakai
Copy link
Owner Author

https://forum.unity.com/threads/invitation-to-try-out-unity-safe-mode.925043/page-2#post-6536662

On previous Unity versions code in precompiled assemblies marked with InitializeOnLoad could be run before compiler.

Yes.
This plugin is based on this "specification."
I'm looking for a workaround.

@SugoiDev
Copy link

It was confirmed as an intentional change:
https://forum.unity.com/threads/invitation-to-try-out-unity-safe-mode.925043/page-2#post-6555160

Hi. At startup it isn't possible to run user code before compilation, if compilation is needed. It is correct that before 2019.3 that Unity at startup would load domain with user assemblies before compilation, even though if there were new scripts. This was considered a problematic and therefore the order was changed.

@mob-sakai
Copy link
Owner Author

@VolodymyrBS @SugoiDev
I found a work-around!
Please try to use 1.4.0-preview.1!

@SugoiDev
Copy link

On 2021.1.a9 the "Apply" button is causing an exception, so I couldn't test it yet.

[Exception] InvalidOperationException: Sequence contains no matching element
Enumerable.First[TSource]() at <351e49e2a5bf4fd6beabb458ce2255f3>:0

ReflectionExtensions.Call() at <26e68dbb771b4491aa5f1dc8f99cc436>:0

Utils.RequestCompilation() at <26e68dbb771b4491aa5f1dc8f99cc436>:0

CscSettingsProvider+<>c.<OnGUI>b__9_1() at Library/PackageCache/com.coffee.csharp-compiler-settings@88d8659a14/Editor/CscSettingsProvider.cs:100
98:       serializedObject.ApplyModifiedProperties();
99:       File.WriteAllText(CscSettingsAsset.k_SettingsPath, JsonUtility.ToJson(serializedObject.targetObject, true));
-->100:       Utils.RequestCompilation();
101:   },
102:   onReload: () =>

InspectorGUI.DrawControl() at Library/PackageCache/com.coffee.csharp-compiler-settings@88d8659a14/Editor/InspectorGUI.cs:175
174:       if (onApply != null && GUILayout.Button(s_ApplyText))
-->175:           onApply();
176:   }

CscSettingsProvider.OnGUI() at Library/PackageCache/com.coffee.csharp-compiler-settings@88d8659a14/Editor/CscSettingsProvider.cs:94
93:   // Controls
-->94:   InspectorGUI.DrawControl(serializedObject.hasModifiedProperties,
95:       onRevert: () => { serializedObject = new SerializedObject(CscSettingsAsset.instance); },
96:       onApply: () =>

SettingsProvider.OnGUI() at <a19e86c7bf354115a4c6a5953c0575cb>:0

@mob-sakai
Copy link
Owner Author

@SugoiDev
Thanks!

@VolodymyrBS
Copy link

just tried with Unity 2020.2.1f1 and it's work without any errors with normal editor launch and in batch mode!🎉

also I tried Unity 2021.1.0b1 and had Enter Safe Mode message. after exiting safe mode I has same error @SugoiDev had

@mob-sakai
Copy link
Owner Author

I've create a new issue for 2021.1.0.

@VolodymyrBS
Copy link

do you have plan to release version 1.4.0 out of preview any time soon?

@mob-sakai
Copy link
Owner Author

@VolodymyrBS ASAP!

@mob-sakai
Copy link
Owner Author

Version 1.4.0 has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

No branches or pull requests

3 participants