JetBrains / resharper-unity

Unity support for both ReSharper and Rider
Apache License 2.0
1.21k stars 134 forks source link

Unity Preferences Rider entry blank? #321

Closed kurbar closed 6 years ago

kurbar commented 6 years ago

I recently added Rider for development in Unity. I wanted to set Rider as my default editor so I went to Unity Preferences -> Rider but it renders a completely blank Preferences window.

image

I'm running Mac OS Sierra 10.12.6

I had Unity closed when doing this.

  1. Installed Rider

  2. Opened my project solution in Rider Rider shows that the Unity plugin was installed I disabled auto-save

  3. Opened Unity

  4. Opened my project solution in Unity I can see that a Plugins directory was created and the Unity3DRider file is present

  5. Opened Unity -> Preferences

  6. Clicked on Rider entry And blank screen as above image

The Unity Console gives this kind of output when trying to open Rider in Preferences Window

ArgumentException: An empty file name is not valid.
System.IO.FileSystemInfo.CheckPath (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileSystemInfo.cs:255)
System.IO.FileInfo..ctor (System.String fileName) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileInfo.cs:58)
(wrapper remoting-invoke-with-check) System.IO.FileInfo:.ctor (string)
Plugins.Editor.JetBrains.RiderPlugin.GetDefaultApp () (at Assets/Plugins/Editor/JetBrains/Unity3DRider.cs:496)
Plugins.Editor.JetBrains.RiderPlugin..cctor () (at Assets/Plugins/Editor/JetBrains/Unity3DRider.cs:655)
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Plugins.Editor.JetBrains.RiderPlugin
System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (RuntimeTypeHandle type) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs:101)
UnityEditor.EditorAssemblies.ProcessEditorInitializeOnLoad (System.Type type) (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorAssemblies.cs:136)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:295)
UnityEditor.HostView.Invoke (System.String methodName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:288)
UnityEditor.HostView.OldOnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:107)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt) (at /Users/builduser/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:179)

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
van800 commented 6 years ago

Duplicate of https://github.com/JetBrains/resharper-unity/issues/320 There is fix already, sorry for that.

VladAdGad commented 6 years ago

Have the same issue Unity3d 2018.1b and Rider 2018.1 EAP Fixed problem. There is solution https://answers.unity.com/questions/1393715/error-invalid-option-6-for-langversion-must-be-iso.html?childToView=1493799#answer-1493799

van800 commented 6 years ago

Please delete Unity3dRider.cs