Custom Inspector that calculate percentage of some values

Hey I want to show in the Inspector the % value of the result of all the Probability that are added.

I got it to work but I dont know how to move it beside the Probability slider

This is what I got right now :

using UnityEngine;
using UnityEditor;
using Sirenix.OdinInspector.Editor;

[CustomEditor(typeof(MobSpawner))]
public class CustomOdinEditor : OdinEditor
{
    SerializedProperty probability;

    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        MobSpawner mobSpawner = (MobSpawner)target;


        foreach (MobSpawn mobSpawn in mobSpawner.mobSpawns)
        {
            float totalProbability = 0;
            foreach (MobLootTable mobLootTable in mobSpawn.mobLootTables)
            {
                if (mobLootTable.ForceDrop == false)
                {
                    totalProbability = totalProbability + mobLootTable.probability;
                }
            }

            foreach (MobLootTable mobLootTable in mobSpawn.mobLootTables)
            {
                if (mobLootTable.ForceDrop == false)
                {
                    float percentage = Mathf.Ceil(mobLootTable.probability / totalProbability * 100);
                    GUILayout.Label(percentage.ToString() + "%");
                }
            }
        }
    }
}

Thanks !

you would need to draw every step by hand in order to get it in line.
Alternatively you could write a custom attribute by deriving from OdinAttributeDrawer and pass a string identifying a property there which calculates the maximum for you.