private void Awake() { if (FeaturesObject == null) { FeaturesObject = GetComponentInParent <FeaturesObjectController>(); } this.hideFlags = HideFlags.HideInInspector; }
private void OnEnable() { features = serializedObject.targetObject as FeaturesObjectController; distances = new List <DistanceInteraction>(); if (distanceSums == null) { distanceSums = new List <List <DistanceInteraction> >(); } var parent = features.transform.Find("distanceParent"); if (parent != null) { distances = parent.GetComponentsInChildren <DistanceInteraction>().ToList(); Dismantling(); } }