Added [ClassesOnly] attribute for usage in large projects, dramatically improving dropdown opening time by lordubbe · Pull Request #57 · Thundernerd/Unity3D-SerializableInterface · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Editor/Attributes.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Editor/Attributes/ClassesOnlyAttribute.cs
11 changes: 11 additions & 0 deletions Editor/Attributes/ClassesOnlyAttribute.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Editor/Drawers/ReferenceDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private void OnButtonClicked(Rect position, SerializedProperty property)
{
AdvancedDropdownState state = new AdvancedDropdownState();
SerializableInterfaceAdvancedDropdown dropdown =
new SerializableInterfaceAdvancedDropdown(state, GenericType, GetRelevantScene(property), property);
new SerializableInterfaceAdvancedDropdown(state, GenericType, GetRelevantScene(property), property, FieldInfo.GetCustomAttribute<ClassesOnlyAttribute>() != null);
dropdown.ItemSelectedEvent += OnItemSelected;
dropdown.Show(position);
}
Expand Down
18 changes: 13 additions & 5 deletions Editor/Utilities/SerializableInterfaceAdvancedDropdown.cs