This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public override string ToString() | |
| { | |
| const BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | | |
| BindingFlags.IgnoreCase | BindingFlags.Instance; | |
| string result = $"{GetType().Name}:"; | |
| FieldInfo[] fields = GetType().GetFields(flags); | |
| for (int i = 0; i < fields.Length; i++) | |
| { | |
| result += $"\n {fields[i].Name} = {fields[i].GetValue(this)}"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// Reflects in to Unity's internal drawers to find the cached | |
| /// Reorderable list that will be used to draw the given property so | |
| /// that it may be modified. | |
| /// | |
| /// This depends on reflection and could break with any Unity update. | |
| /// An alternative to using this would be to create your own | |
| /// ReorderableList in a property drawer or custom editor. | |
| /// </summary> | |
| /// <param name="property">Array or List Property to look up.</param> |