Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [CustomPropertyDrawer(typeof(CompositeAudioEvent.CompositeEntry))]
- public class CompositeEntryDrawer : PropertyDrawer
- {
- public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
- {
- return 2 * EditorGUIUtility.singleLineHeight;
- }
- public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
- {
- position.height = EditorGUIUtility.singleLineHeight;
- EditorGUI.PropertyField(position, property.FindPropertyRelative("Event"));
- position.y += position.height;
- EditorGUI.PropertyField(position, property.FindPropertyRelative("Weight"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement