public void Init(List <string> _hashNames, List <int> _hashes, string[] _dnaNames = null) { hashNames = _hashNames; hashes = _hashes; dnaNames = _dnaNames; if (thisSpValDrawer == null) { thisSpValDrawer = new spValModifierPropertyDrawer(); } thisSpValDrawer.dnaNames = dnaNames; if (warningIcon == null) { warningIcon = EditorGUIUtility.FindTexture("console.warnicon.sml"); warningStyle = new GUIStyle(EditorStyles.label); warningStyle.fixedHeight = warningIcon.height + 4f; warningStyle.contentOffset = new Vector2(0, -2f); } }
#pragma warning disable 618 //disable obsolete warning public bool Init(List <string> _hashNames, List <int> _hashes, string[] _dnaNames = null) { if (!_initialized) { hashNames = _hashNames; hashes = _hashes; dnaNames = _dnaNames; //Will be removed ina future version since we use DNAEvaluatorList for these now if (_allowLegacyDNADrawer) { if (thisSpValDrawer == null) { thisSpValDrawer = new spValModifierPropertyDrawer(); } thisSpValDrawer.dnaNames = dnaNames; } if (warningIcon == null) { warningIcon = EditorGUIUtility.FindTexture("console.warnicon.sml"); warningStyle = new GUIStyle(EditorStyles.label); warningStyle.fixedHeight = warningIcon.height + 4f; warningStyle.contentOffset = new Vector2(0, -2f); } valueOverrideLabel.image = warningIcon; _initialized = true; } else { if (_dnaNames != null) { UpdateDnaNames(_dnaNames); } } return(_initialized); }