Answered
0
0

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
UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle
style, UnityEngine.GUILayoutOption[] options, System.Type layoutType)
(at
C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs:264)
UnityEditor.EditorGUILayout.BeginHorizontal (UnityEngine.GUIContent
content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[]
options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6765)
UnityEditor.EditorGUILayout.BeginHorizontal
(UnityEngine.GUILayoutOption[] options) (at
C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6744)
UnityEditor.InspectorWindow.AddComponentButton (UnityEditor.Editor[]
editors) (at
C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1368)
UnityEditor.InspectorWindow.OnGUI () (at
C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:379)
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-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

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);

  • You must to post comments
Best Answer
0
0

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.

  • Shawn Halwes

    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?

  • Nicholas Wilcox

    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.

  • Shawn Halwes

    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.

  • Nicholas Wilcox

    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.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.