Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed error and bug. #90

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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: 6 additions & 2 deletions Editor/AddressableImportSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ public class AddressableImportSettings : ScriptableObject
public bool rulesEnabled = true;

[Tooltip("Creates a group if the specified group doesn't exist.")]
public bool allowGroupCreation = false;
public bool allowGroupCreation;

[Space]
[Tooltip("Rules for managing imported assets.")]
#if ODIN_INSPECTOR
[ListDrawerSettings(HideAddButton = false,Expanded = false,DraggableItems = true,HideRemoveButton = false)]
#if ODIN_INSPECTOR
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems the #ODIN_INSPECTOR should be versioned.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, different API in different version.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, please change the related symbol to be versioned (#ODIN_INSPECTOR_X_Y_Z)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iDreamsOfGame my point is that your patch contains two duplicated #if ODIN_INSPECTOR symbol (a typo?), the second one should be a versioned symbol.

#if ODIN_INSPECTOR
#if ODIN_INSPECTOR <-- should be versioned like #if ODIN_INSPECTOR_X_Y_Z
...
#else
...
#endif

[ListDrawerSettings(HideAddButton = false, ShowFoldout = false, DraggableItems = true, HideRemoveButton = false)]
#else
[ListDrawerSettings(HideAddButton = false, Expanded = false, DraggableItems = true, HideRemoveButton = false)]
#endif
[Searchable(FilterOptions = SearchFilterOptions.ISearchFilterableInterface)]
#endif
public List<AddressableImportRule> rules = new List<AddressableImportRule>();
Expand Down
1 change: 1 addition & 0 deletions Editor/AddressableImportSettingsList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public void RebuildSettingsList()
{
var importSettingsGuidList = AssetDatabase.FindAssets($"t:{nameof(AddressableImportSettings)}");
SettingList = importSettingsGuidList.Select((guid) => AssetDatabase.LoadAssetAtPath<AddressableImportSettings>(AssetDatabase.GUIDToAssetPath(guid))).ToList();
EditorUtility.SetDirty(this);
AssetDatabase.SaveAssets();
}

Expand Down