Sorry I did not see where to report bugs is this is the wrong place to do it:
ParamRefDrawer generates errors when viewed in the inspector:
ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
style, UnityEngine.GUILayoutOption options, System.Type layoutType)
content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption
options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6765)
(UnityEngine.GUILayoutOption options) (at
UnityEditor.InspectorWindow.OnGUI () (at
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object
parameters, System.Globalization.CultureInfo culture) (at
The line at 20:
EditorGUILayout.Slider(valueProperty, 0, 1.0f, nameProperty.stringValue);
Should be changed to:
EditorGUI.Slider(position, valueProperty, 0.0f, 1.0f, nameProperty.stringValue);
ParamRefDrawer.cs has been removed in upcoming versions of the Unity Integration. The ParamRef class is internal to the StudioEventEmitter and serves no purpose in outside code.
The purpose it serves in outside code is the same as the EventRef attribute. Standardize the serialization and inspector presentation of fundamental data use by the FMOD system in Unity.
Developers will need to be able to serialize parameter data. Not all games will store data in instances of StudioEventEmitter components.
If it is going to be removed is there going to be a standard for serializing and inspecting parameters in Unity or is the expectation that we roll our own again?
Does this mean there is going to be yet another data migration because public facing classes are going to be removed/updated again?
Is there a road map for these kinds of things to help us prepare?
ParamRef itself is not going to do disappear. But what value would the current UI code add (if it worked)? It doesn’t know the min, max, or default values for a parameter, it can’t automatically validate parameter names against any event. I don’t see it being to add any value above the default UI code generated by Unity.
It is good to hear that ParmRef is not going to disappear. I interpreted your comment about it not having use outside StudioEventEmitter as it being deprecated as a publicly accessible class along with the drawer.
I agree it would be better to have something that would do those things you mentioned. If you’re suggesting that the drawer class is going to be replaced by a more useful inspector implementation that will do those things then that would make me very happy.
As it stands we have had to roll our own custom inspector for parameter data that does do those things you mention, and I would prefer to use a standardized implementation provided by FMOD.
In the longer term we could add a ParmaRef attribute such as https://gist.github.com/fmod-nick/4e452d142c427d541553 which would give the UI the extra information it would need to be worthwhile.