2021.2 volume editor is not working

When I click something with volume on it I got this error and can’t see and change volume details in inspector.

NullReferenceException: Object reference not set to an instance of an object

UnityEditor.Rendering.VolumeEditor.OnInspectorGUI () (at Library/PackageCache/com.unity.render-pipelines.core@12.1.0/Editor/Volume/VolumeEditor.cs:124)

UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.b__0 () (at <5cd53c58cab44054a1ac592b0da25132>:0)

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

I have the same issue unfortunately. Did you find the solution though?

not yet, Unity said “They couldn’t recreate the problem”.
The thing is I think this is also related to the problem below. It is again about Turkish Charset.

Thank you mate, I guess we should wait for Unity to fix this issue…

Here’s an update on this.

With 2021.2 Unity made something very strange and I don’t know what it is, but if you’re using different language or format in Windows, Unity will confuse while having uppercase or lowercase conversion.

For HDRP Volume settings, simply go to Editor/CoreEditorUtils and change this line (57):

                var name = me.Member is FieldInfo
                    ? me.Member.Name
                    : "m_" + me.Member.Name.Substring(0, 1).ToUpper() + me.Member.Name.Substring(1);

to this

                var name = me.Member is FieldInfo
                    ? me.Member.Name
                    : "m_" + me.Member.Name.Substring(0, 1).ToUpperInvariant() + me.Member.Name.Substring(1);

Unity should use Invariant everywhere possible to avoid problems like this. Same issue was present in Valve SteamVR Unity SDK and even though they merged my fix long before, they re-introduced it…

5 Likes

thanks it seems it is gone in 2.4f1

Works like a charm. Thank you so much.

Thank you so much! This is the only fix at the moment. By the way if you’re doing this on an already existing project be sure to delete the library folder in your project hierarchy. Deleting and recreating (Unity does automatically) that folder triggers the fix. Of course I advise a version control in any case.