public override void OnInspectorGUI()
    {
        ds = (VRC_DestructibleStandard)target;

        // Update the serializedProperty - always do this in the beginning of OnInspectorGUI.
        serializedObject.Update();

        EditorGUILayout.PropertyField(maxHealth, new GUIContent("Max Health"));
        EditorGUILayout.PropertyField(currentHealth, new GUIContent("Current Health"));
        EditorGUILayout.PropertyField(healable, new GUIContent("Is Healable"));

        EditorGUILayout.PropertyField(onDamagedTrigger, new GUIContent("On Damaged Trigger"));
        VRC_EditorTools.DrawTriggerActionCallback("On Damaged Action", ds.onDamagedTrigger, ds.onDamagedEvent);

        EditorGUILayout.PropertyField(onDestroyedTrigger, new GUIContent("On Destructed Trigger"));
        VRC_EditorTools.DrawTriggerActionCallback("On Destructed Action", ds.onDestructedTrigger, ds.onDestructedEvent);

        EditorGUILayout.PropertyField(onHealedTrigger, new GUIContent("On Healed Trigger"));
        VRC_EditorTools.DrawTriggerActionCallback("On Healed Action", ds.onHealedTrigger, ds.onHealedEvent);

        EditorGUILayout.PropertyField(onFullHealedTrigger, new GUIContent("On Full Healed Trigger"));
        VRC_EditorTools.DrawTriggerActionCallback("On Full Healed Action", ds.onFullHealedTrigger, ds.onFullHealedEvent);

        // Apply changes to the serializedProperty - always do this in the end of OnInspectorGUI.
        serializedObject.ApplyModifiedProperties();
    }
    public override void OnGUI(Rect rect, SerializedProperty property, GUIContent label)
    {
        SerializedProperty source = property.FindPropertyRelative("Source");
        SerializedProperty speed  = property.FindPropertyRelative("PlaybackSpeed");
        SerializedProperty clip   = property.FindPropertyRelative("VideoClip");
        SerializedProperty url    = property.FindPropertyRelative("URL");
        SerializedProperty live   = property.FindPropertyRelative("SyncType");
        SerializedProperty sync   = property.FindPropertyRelative("SyncMinutes");

        EditorGUI.BeginProperty(rect, label, property);
        float x = rect.x;
        float y = rect.y;
        float w = rect.width;
        float h = EditorGUI.GetPropertyHeight(source, new GUIContent("Source"), true) + EditorGUIUtility.standardVerticalSpacing;

        VRC_EditorTools.FilteredEnumPopup <UnityEngine.Video.VideoSource>(new Rect(x, y, w, h), source, (e) => e == UnityEngine.Video.VideoSource.Url);
        y += h;

        if (source.enumValueIndex == (int)UnityEngine.Video.VideoSource.Url)
        {
            h = EditorGUI.GetPropertyHeight(url, new GUIContent("URL"), true) + EditorGUIUtility.standardVerticalSpacing;
            EditorGUI.PropertyField(new Rect(x, y, w, h), url);
            y += h;
        }
        else
        {
            h = EditorGUI.GetPropertyHeight(clip, new GUIContent("VideoClip"), true) + EditorGUIUtility.standardVerticalSpacing;
            EditorGUI.PropertyField(new Rect(x, y, w, h), clip);
            y += h;
        }

        h = EditorGUI.GetPropertyHeight(speed, new GUIContent("Playback Speed"), true) + EditorGUIUtility.standardVerticalSpacing;
        EditorGUI.PropertyField(new Rect(x, y, w, h), speed);
        if (speed.floatValue == 0f)
        {
            speed.floatValue = 1f;
        }
        y += h;

        h = EditorGUI.GetPropertyHeight(live, new GUIContent("SyncType"), true) + EditorGUIUtility.standardVerticalSpacing;
        EditorGUI.PropertyField(new Rect(x, y, w, h), live);
        y += h;

        h = EditorGUI.GetPropertyHeight(sync, new GUIContent("SyncMinutes"), true) + EditorGUIUtility.standardVerticalSpacing;
        EditorGUI.PropertyField(new Rect(x, y, w, h), sync);
        if (sync.floatValue < 1f)
        {
            sync.floatValue = 0;
        }
        y += h;

        EditorGUI.EndProperty();
    }