Overriding member objects
So in my use case, I have something like:
[SOVariant]
[CreateAssetMenu(menuName = "MyGame/Player Config")]
public class PlayerConfig: ScriptableObject
{
public int health = 100;
public float moveSpeed;
public ShotProperties strike;
public ShotProperties pass;
}
[Serializable]
public class ShotProperties
{
public float startChargeTime;
public float chargeMaxTime;
public float chargeMinDistance;
public float chargeMaxDistance;
public float minAnimTime;
public float maxAnimTime;
}
using the SO variants, i can see the checkbox next to the pass and strike field, with a triangle to expand this properties at the side. If I try to expand it, it will try to show me the values I'd want to override on one single line, which renders terribly since the ShotProperties has 6 fields, making this unusable
Sorry getting back to this.
Yeah you're right, looks like something changed in Odin and the display is broken for nested classes. Looking into it when I get the chance.
Thanks for reporting!
It looks like the horizontal layout is overriding the object foldout for some reason, it should be fixed in the new version I'm working on if you'd like to give it a try: https://github.com/GieziJo/ScriptableObjectVariant.git#SOData
Just for the sake of transparency, I would note that this package might not be super useful for classes inside scriptable objects, as the whole object is either overriden or not, not individual fields. It might make more sense to have a linked scriptable object where each member can be overriden.
Sorry super late fix, hope it helps, totally understand if it's not the case!
Thanks @GieziJo , already moved on to another project but appreciate this issue actually being addressed.