Closed Dawie3565 closed 3 months ago
Fixed in v1.9.6.2 for 2019 to 2023.1
However, due to a Unity API change, our custom mesh preview feature is no longer possible from 2023.2+, since we can't customize the preview settings bar anymore. Unity's fault not ours, but sorry anyway.
--- Unity BIRP --- ASE 1.9.6.0
--- Unity 2022.3.22 BIRP Error
ArgumentNullException: Value cannot be null. Parameter name: type System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic, System.Boolean wrapExceptions) (at <27124aa0e30a41659b903b822b959bc7>:0) System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) (at <27124aa0e30a41659b903b822b959bc7>:0) System.Activator.CreateInstance (System.Type type) (at <27124aa0e30a41659b903b822b959bc7>:0) ASEMaterialInspector.OnMaterialInteractivePreviewGUI (UnityEditor.MaterialEditor materialEditor, UnityEngine.Rect r, UnityEngine.GUIStyle background) (at Assets/AmplifyShaderEditor/Plugins/Editor/Utils/CustomMaterialInspector.cs:516) UnityEditor.MaterialEditor.OnInteractivePreviewGUI (UnityEngine.Rect r, UnityEngine.GUIStyle background) (at <80a8ce1980c648dca8e68f0d8aa3b930>:0) UnityEditor.ObjectPreview.DrawPreview (UnityEditor.IPreviewable defaultPreview, UnityEngine.Rect previewArea, UnityEngine.Object[] targets) (at <80a8ce1980c648dca8e68f0d8aa3b930>:0) UnityEditor.Editor.DrawPreview (UnityEngine.Rect previewArea) (at <80a8ce1980c648dca8e68f0d8aa3b930>:0) UnityEditor.PropertyEditor.DrawPreviewAndLabels () (at <80a8ce1980c648dca8e68f0d8aa3b930>: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 <332857d8803a4878904bcf8f9581ec33>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
to reproduce --- open ASE new shader with ASEMaterialInspector --- apply material and view Inspector window for shader --- on bottom area try to add a custom mesh for preview
https://github.com/user-attachments/assets/6b80c405-7884-443e-ba19-27e76fd29145
Note BIRP 2019.4.31 -- works correctly with no issues and applied custom mesh BIRP 2020.3.48 -- fails to add however no errors BIRP 2021.3.41 -- fails to add however no errors BIRP 2022.3.22 -- Null Errors