using System; using System.Collections.Generic; using UnityEngine; [Serializable] public class splat_custom_class { public List value; public bool custom; public bool foldout; public Rect rect; public Rect rect2; public Rect rect3; public float totalValue; public bool changed; public splat_custom_class(int length) { value = new List(); for (int i = 0; i < length; i++) { value.Add(0f); } } public virtual void CalcTotalValue() { totalValue = 0f; for (int i = 0; i < value.Count; i++) { totalValue += value[i]; } } }