Skip to content

Commit

Permalink
Remove namespace setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Eastrall committed Jul 9, 2023
1 parent e2a3034 commit bc122a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
16 changes: 3 additions & 13 deletions Editor/Scripts/Settings/RosalinaSettings.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#if UNITY_EDITOR

using UnityEditor;
using UnityEngine;
/// <summary>
Expand All @@ -9,14 +10,12 @@ public class RosalinaSettings : ScriptableObject
/// <summary>
/// Gets the current Rosalina settings.
/// </summary>
public static RosalinaSettings Current => AssetDatabase.LoadAssetAtPath<RosalinaSettings>("Assets/Rosalina/RosalinaSettings.asset");
public static RosalinaSettings Current => AssetDatabase.LoadAssetAtPath<RosalinaSettings>("Assets/Rosalina/RosalinaSettings.asset")
?? ScriptableObject.CreateInstance<RosalinaSettings>();

[SerializeField]
private bool _isEnabled;

[SerializeField]
private string _defaultNamespace;

/// <summary>
/// Gets or sets a boolean value that indicates if Rosalina is enabled.
/// </summary>
Expand All @@ -25,15 +24,6 @@ public bool IsEnabled
get => _isEnabled;
set => _isEnabled = value;
}

/// <summary>
/// Gets or sets the default namespace to use during code generation.
/// </summary>
public string DefaultNamespace
{
get => _defaultNamespace;
set => _defaultNamespace = value;
}
}

#endif
3 changes: 1 addition & 2 deletions Editor/Scripts/Settings/RosalinaSettingsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public override void OnGUI(string searchContext)
EditorGUI.BeginChangeCheck();

_settings.IsEnabled = EditorGUILayout.Toggle("Is Enabled", _settings.IsEnabled);
_settings.DefaultNamespace = EditorGUILayout.TextField("Default Namespace", _settings.DefaultNamespace);

if (EditorGUI.EndChangeCheck())
{
Expand All @@ -36,7 +35,7 @@ public override void OnGUI(string searchContext)
}
}

private static RosalinaSettings CreateRosalinaSettingsAsset()
public static RosalinaSettings CreateRosalinaSettingsAsset()
{
string resourcePath = "Assets/Rosalina";

Expand Down

0 comments on commit bc122a1

Please sign in to comment.