Open wonsuc opened 5 years ago
I'm receiving that first error also, Just the first one, not the other two. I'm trying to use it in Unity 2018.3.0f2. For the sake of completeness, I'm bringing it in via the package manager, adding a local package, which is the cloned project as it sits on my drive.
I'm new to git, so I don't know how to submit a change for this project. I'd be happy to if someone wants to point me to a step by step. but as I open ModifyEditorStyles.cs and move on down to line 250 and 251 I changed the code to: public ModifyEditorStyleProvider(string path, SettingsScope scope = SettingsScope.User) : base(path, scope) So SettingsScopes and scopes I dropped the trailing S, scope instead of scopes, and instead of .any, it's .User (to show in the Preferences window.
With that change, the error is gone, and Modify Editor Style shows in the Preferences window. But, as listed in that window, There is a problem with the compiled Unity Source code.
Is that only in 2018. 3 that the problem exists, or does it go back further?
public ModifyEditorStyleProvider(string path, SettingsScope scope = SettingsScope.User) : base(path, scope)
Unity 2019.4.13f1 error
NullReferenceException: Object reference not set to an instance of an object
ModifyEditorStyle.Modify () (at Assets/Editor/ModifyEditorStyle.cs:322)
ModifyEditorStyle.ModifyEditorStylePreference () (at Assets/Editor/ModifyEditorStyle.cs:287)
ModifyEditorStyle+ModifyEditorStyleProvider.OnGUI (System.String searchContext) (at Assets/Editor/ModifyEditorStyle.cs:256)
UnityEditor.SettingsWindow.DrawControls () (at <1fe7a3c0284a456b9681b7a93141c89a>:0)
UnityEditor.SettingsWindow.DrawSettingsPanel () (at <1fe7a3c0284a456b9681b7a93141c89a>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0)
@Dzynek We've got the same issue, any chance you resolved it?
If change ModifyEditorStyleProvider SettingsScopes to SettingsScope scopes = SettingsScope.User will be ok, but there some Reflection problem with eType when try to GetField. In Editor styles new field names: standardFont boldFont miniFont miniBoldFont But when Modify() execute you have NullReferenceException: Object reference not set to an instance of an object at that fields. Need help to solve this problem.
Does this script work in 2018.3.0f1?
I get these error, please let me know if I'm missing something. Thanks a lot.