private void OnDisable() { if (_parameters != null) { _parameters.Destroy(); _parameters = null; } }
private void ValidateStreams(SerializedProperty property) { if (_expressionsProperty == null) { _anyExpressionProperty = property.FindPropertyRelative("_any"); _expressionsProperty = new ListProperty(property.FindPropertyRelative("_expressions")) { DisplayName = property.displayName, DrawHeader = OnDrawHeader, DrawElementLine = OnDrawElement }; } }
private void ValidateStreams(SerializedProperty property) { if (_streams == null || _streamsProperty == null)// || _property != property) { _streams = new StreamsProperty(property.serializedObject.targetObject as Component, typeof(ValueStream)); _streamsProperty = new ListProperty(property.FindPropertyRelative("_items")) { DrawElementLine = OnDrawElement, Changed = OnChanged }; } _property = property; }
private void OnEnable() { var applicator = target as AnimatorApplicator; if (applicator == null) { return; } _animParameters = applicator.GetComponent <Animator>().parameters; _animParameterNames = System.Array.ConvertAll(_animParameters, p => string.Format("{0} ({1})", p.name, p.type)); _streams = new StreamsProperty(applicator, typeof(Stream)); _parameters = new ListProperty(serializedObject.FindProperty("_parameters")) { DrawElementLine = OnDrawElement }; }
private void OnChanged() { _streamsProperty = null; ValidateStreams(_property); }