Skip to content

Commit 0dd63db

Browse files
committed
Update
1 parent 2c9fdd9 commit 0dd63db

File tree

8 files changed

+37
-26
lines changed

8 files changed

+37
-26
lines changed

Assets/Plugins/UnityEventHelper/PersistentCalls.json.meta renamed to Assets/Assets.meta

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Plugins/UnityEventHelper/ScriptsWithEvents.json.meta renamed to Assets/Assets/Plugins.meta

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Assets/Plugins/UnityEventHelper.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Plugins/UnityEventHelper/PersistentCalls.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

Assets/Plugins/UnityEventHelper/ScriptsWithEvents.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

Assets/Plugins/UnityEventHelper/UnityEventHelperSettings.asset

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ MonoBehaviour:
1515
_isTrackingEnabled:
1616
_value: 1
1717
_openWindowAutomatically: 1
18-
_foldersToExclude:
18+
_foldersToIgnore:
1919
- Plugins
2020
- Samples
2121
_isHighlightingEnabled:
2222
_value: 1
2323
_validCallColor:
24-
_value: {r: 0, g: 1, b: 0.11983681, a: 0.25}
24+
_value: {r: 0, g: 1, b: 0, a: 0.25}
2525
_invalidCallColor:
2626
_value: {r: 1, g: 0, b: 0, a: 0.25}

Assets/UnityEventTracker/Scripts/Editor/Core/UnityEventTracker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ private static void UpdateScriptsWithEventsList(IEnumerable<ScriptAsset> changed
254254
}
255255

256256
private static void ValidateAllMethodsInClasses(IEnumerable<ScriptAsset> classes)
257-
{
257+
{
258258
var changed = false;
259259

260260
foreach (var scriptAsset in classes)

Assets/UnityEventTracker/Scripts/Editor/UnityEventHelperSettings.cs

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,21 @@ public class UnityEventHelperSettings : ScriptableObject
3636
"scan whole project via Tools/UnityEventHelper/Scan Project command")]
3737
private ObservableProperty<bool> _isHighlightingEnabled = true;
3838

39-
[SerializeField] private ObservableProperty<Color> _validCallColor = new Color(0, 1, 0, 0.25f);
39+
[SerializeField] private ObservableProperty<Color> _validCallColor = new Color(0, 1, 0, 0.25f);
4040
[SerializeField] private ObservableProperty<Color> _invalidCallColor = new Color(1, 0, 0, 0.25f);
4141

42-
public ObservableProperty<bool> IsTrackingEnabled => _isTrackingEnabled;
43-
public ObservableProperty<bool> IsHighlightingEnabled => _isHighlightingEnabled;
44-
public bool OpenWindowAutomatically => _openWindowAutomatically;
45-
public ObservableProperty<Color> ValidCallColor => _validCallColor;
46-
public ObservableProperty<Color> InvalidCallColor => _invalidCallColor;
47-
42+
public ObservableProperty<bool> IsTrackingEnabled => _isTrackingEnabled;
43+
public ObservableProperty<bool> IsHighlightingEnabled => _isHighlightingEnabled;
44+
public bool OpenWindowAutomatically => _openWindowAutomatically;
45+
public ObservableProperty<Color> ValidCallColor => _validCallColor;
46+
public ObservableProperty<Color> InvalidCallColor => _invalidCallColor;
47+
4848
public bool InInitialScanComplete
4949
{
5050
get => PlayerPrefs.GetInt("UnityEventHelperSettings_InInitialScanComplete", 0) == 1;
5151
set => PlayerPrefs.SetInt("UnityEventHelperSettings_InInitialScanComplete", value ? 1 : 0);
5252
}
53-
53+
5454
[MenuItem("Tools/UnityEventTracker/Show Settings")]
5555
public static void ShowUnityEventHelperSettings()
5656
{
@@ -66,6 +66,7 @@ public bool ShouldSkipFolder(string relativePath)
6666
}
6767

6868
private static UnityEventHelperSettings _instance;
69+
6970
public static UnityEventHelperSettings Instance()
7071
{
7172
if (_instance != null)
@@ -79,26 +80,28 @@ public static UnityEventHelperSettings Instance()
7980

8081
return _instance;
8182
}
82-
83-
private const string SettingsPath = "Plugins/UnityEventHelper/UnityEventHelperSettings.asset";
83+
8484
private static UnityEventHelperSettings CreateDefaultSettings()
8585
{
8686
var instance = CreateInstance<UnityEventHelperSettings>();
8787

88-
CreateRootDirectory();
88+
var path = CreateRootDirectory();
8989

90-
AssetDatabase.CreateAsset(instance, SettingsPath);
90+
var filePath = Path.Combine(path, "UnityEventHelperSettings.asset");
91+
AssetDatabase.CreateAsset(instance, filePath);
9192
AssetDatabase.SaveAssets();
9293
return instance;
9394
}
9495

95-
private static void CreateRootDirectory()
96+
private static string CreateRootDirectory()
9697
{
97-
var fullPath = Path.Combine(Application.dataPath, SettingsPath);
98+
const string settingsPath = "Plugins/UnityEventHelper";
99+
var fullPath = Path.Combine(Application.dataPath, settingsPath);
98100

99-
if (Directory.Exists(fullPath)) return;
101+
if (!Directory.Exists(fullPath))
102+
Directory.CreateDirectory(fullPath);
100103

101-
Directory.CreateDirectory(fullPath);
104+
return fullPath.Substring(fullPath.IndexOf("Assets", StringComparison.InvariantCulture));
102105
}
103106
}
104-
}
107+
}

0 commit comments

Comments
 (0)