pvtctrlalt
New member
Hi,
mabey i am doing this wrong but id like to neaten the inspector a bit by having groups of variables by creating a custom class.
this works but i cant use those variables on my nodes. for example id assume the floats would appear in there as an option
i have also tried settig them as shared variables
mabey i am doing this wrong but id like to neaten the inspector a bit by having groups of variables by creating a custom class.
this works but i cant use those variables on my nodes. for example id assume the floats would appear in there as an option
i have also tried settig them as shared variables
Code:
public class femaleVars
{
public bool Female;
public float timeToGiveBirth = 5;
public bool pregnant;
public GameObject BabyPrefab;
}
[System.Serializable]
public class femaleSettings : SharedVariable<femaleVars>
{
public static implicit operator femaleSettings(femaleVars value) { return new femaleSettings { Value = value }; }
}