Skip to content

Commit

Permalink
chore: more reorg
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisonHough committed Dec 19, 2023
1 parent 3db9957 commit be75f11
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 18 deletions.
8 changes: 4 additions & 4 deletions Editor/AvatarCreator/AssetTypeFilterDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using UnityEditor;
using UnityEngine;

namespace ReadyPlayerMe.AvatarCreator
namespace ReadyPlayerMe.AvatarCreator.Editor
{
[CustomPropertyDrawer(typeof(AssetTypeFilterAttribute))]
public class AssetTypeFilterDrawer : PropertyDrawer
Expand All @@ -27,14 +27,14 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten
var enumFieldInfo = typeof(AssetType).GetField(enumName);
var enumAttribute = (AssetTypeFilterAttribute) Attribute.GetCustomAttribute(enumFieldInfo, typeof(AssetTypeFilterAttribute));
if (enumAttribute == null) continue;
var filter =(AssetFilter) Enum.Parse(typeof(AssetFilter), enumAttribute.filter.ToString());

var filter = (AssetFilter) Enum.Parse(typeof(AssetFilter), enumAttribute.filter.ToString());
if (filter == assetTypeAttribute?.filter)
{
filteredEnumNames.Add(enumName);
}
}

// Display the dropdown with filtered enum values
var newIndex = EditorGUI.Popup(position, label.text, Array.IndexOf(filteredEnumNames.ToArray(), currentEnumValue.ToString()), filteredEnumNames.ToArray());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
"name": "ReadyPlayerMe.AvatarCreator.Editor",
"rootNamespace": "",
"references": [
"ReadyPlayerMe.Core.AvatarCreator"
"ReadyPlayerMe.Core",
"ReadyPlayerMe.AvatarCreator"
],
"includePlatforms": [
"Editor"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
Expand Down
2 changes: 1 addition & 1 deletion Editor/Core/Scripts/ReadyPlayerMe.Core.Editor.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"rootNamespace": "",
"references": [
"ReadyPlayerMe.Core",
"ReadyPlayerMe.Core.AvatarCreator"
"ReadyPlayerMe.AvatarCreator"
],
"includePlatforms": [
"Editor"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ReadyPlayerMe.Core.AvatarCreator",
"name": "ReadyPlayerMe.AvatarCreator",
"rootNamespace": "",
"references": [
"ReadyPlayerMe.Core"
Expand All @@ -13,4 +13,4 @@
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "ReadyPlayerMe.Core.LegacyAvatarCreator.Editor",
"rootNamespace": "",
"references": [
"ReadyPlayerMe.Core.AvatarCreator",
"ReadyPlayerMe.Core",
"ReadyPlayerMe.Core.LegacyAvatarCreator"
"ReadyPlayerMe.Core.LegacyAvatarCreator",
"ReadyPlayerMe.AvatarCreator"
],
"includePlatforms": [
"Editor"
Expand All @@ -17,4 +17,4 @@
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "ReadyPlayerMe.Core.LegacyAvatarCreator",
"rootNamespace": "",
"references": [
"ReadyPlayerMe.Core.AvatarCreator",
"ReadyPlayerMe.Core"
"ReadyPlayerMe.Core",
"ReadyPlayerMe.AvatarCreator"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
3 changes: 1 addition & 2 deletions Tests/Editor/AuthTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System.Threading.Tasks;
using NUnit.Framework;
using ReadyPlayerMe.AvatarCreator;

namespace ReadyPlayerMe.Core.Tests
namespace ReadyPlayerMe.AvatarCreator.Tests
{
public class AuthTests
{
Expand Down
4 changes: 2 additions & 2 deletions Tests/Editor/ReadyPlayerMe.Core.Editor.Tests.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"references": [
"ReadyPlayerMe.Core",
"ReadyPlayerMe.Core.Editor",
"ReadyPlayerMe.Core.AvatarCreator"
"ReadyPlayerMe.AvatarCreator"
],
"includePlatforms": [
"Editor"
Expand All @@ -21,4 +21,4 @@
],
"versionDefines": [],
"noEngineReferences": false
}
}

0 comments on commit be75f11

Please sign in to comment.