protected override Tag[] GetReferenceTags(int index) { List <Tag> result = new List <Tag>(); if (index >= this.instance.references.Length) { return(result.ToArray()); } SOVariable reference = this.instance.references[index]; if (reference == null) { return(result.ToArray()); } int mask = reference.variable.tags; Tag[] tags = GlobalTagsEditor.GetTags(); for (int i = 0; i < tags.Length; ++i) { if ((mask & 1) != 0) { result.Add(tags[i]); } mask >>= 1; } return(result.ToArray()); }
public static string[] GetTagNames() { Tag[] tagInstances = GlobalTagsEditor.GetTags(); if (tagInstances.Length == 0) { return(new string[0]); } string[] tags = new string[tagInstances.Length]; for (int i = 0; i < tagInstances.Length; ++i) { tags[i] = tagInstances[i].name; } return(tags); }