Implement Debug settings and provide an overview of the settings madness
This commit is contained in:
3
Assets/Scripts/Core/Settings/Developer.meta
Normal file
3
Assets/Scripts/Core/Settings/Developer.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5974bd02c2114bcbbbbb1b8d8f91da3c
|
||||
timeCreated: 1760102254
|
||||
62
Assets/Scripts/Core/Settings/Developer/DebugSettings.cs
Normal file
62
Assets/Scripts/Core/Settings/Developer/DebugSettings.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace AppleHills.Core.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum defining log verbosity levels
|
||||
/// </summary>
|
||||
public enum LogVerbosity
|
||||
{
|
||||
None = 0,
|
||||
Errors = 1,
|
||||
Warnings = 2,
|
||||
Info = 3,
|
||||
Verbose = 4
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Developer settings for debugging features and options.
|
||||
/// These settings are meant to be used during development and testing.
|
||||
/// </summary>
|
||||
[CreateAssetMenu(fileName = "DebugSettings", menuName = "AppleHills/Developer Settings/Debug", order = 2)]
|
||||
public class DebugSettings : BaseDeveloperSettings
|
||||
{
|
||||
[Header("Visualization")]
|
||||
[Tooltip("Show colliders for game objects")]
|
||||
[SerializeField] private bool showColliders = false;
|
||||
|
||||
[Tooltip("Show performance statistics (FPS, memory usage, etc.)")]
|
||||
[SerializeField] private bool showPerformanceStats = false;
|
||||
|
||||
[Header("Logging")]
|
||||
[Tooltip("Level of detail for logging")]
|
||||
[SerializeField] private LogVerbosity logLevel = LogVerbosity.Warnings;
|
||||
|
||||
[Header("Gameplay")]
|
||||
[Tooltip("Make player invulnerable and ignore gameplay restrictions")]
|
||||
[SerializeField] private bool godMode = false;
|
||||
|
||||
[Tooltip("Global time scale for debugging animations and effects")]
|
||||
[Range(0.1f, 10f)]
|
||||
[SerializeField] private float timeScale = 1.0f;
|
||||
|
||||
// Property getters
|
||||
public bool ShowColliders => showColliders;
|
||||
public bool ShowPerformanceStats => showPerformanceStats;
|
||||
public LogVerbosity LogLevel => logLevel;
|
||||
public bool GodMode => godMode;
|
||||
public float TimeScale => timeScale;
|
||||
|
||||
public override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
|
||||
// Apply any immediate effects when values change in the editor
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
// Set time scale directly when changed in editor
|
||||
Time.timeScale = timeScale;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9fd485d4ab84bea9946425e742ccd9c
|
||||
timeCreated: 1760102133
|
||||
@@ -7,7 +7,7 @@ namespace AppleHills.Data.CardSystem
|
||||
/// Scriptable object defining a collectible card's properties.
|
||||
/// Used as a template for generating CardData instances.
|
||||
/// </summary>
|
||||
[CreateAssetMenu(fileName = "New Card", menuName = "Apple Hills/Card System/Card Definition")]
|
||||
[CreateAssetMenu(fileName = "New Card", menuName = "AppleHills/Card System/Card Definition")]
|
||||
public class CardDefinition : ScriptableObject
|
||||
{
|
||||
[Header("Identification")]
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace AppleHills.Data.CardSystem
|
||||
/// ScriptableObject containing visual configuration for card display
|
||||
/// Maps card rarities to colors and zones to colors/shapes
|
||||
/// </summary>
|
||||
[CreateAssetMenu(fileName = "CardVisualConfig", menuName = "Apple Hills/Card System/Visual Config")]
|
||||
[CreateAssetMenu(fileName = "CardVisualConfig", menuName = "AppleHills/Card System/Visual Config")]
|
||||
public class CardVisualConfig : ScriptableObject
|
||||
{
|
||||
[Serializable]
|
||||
|
||||
@@ -8,7 +8,7 @@ using PuzzleS;
|
||||
|
||||
namespace Dialogue
|
||||
{
|
||||
[AddComponentMenu("Apple Hills/Dialogue/Dialogue Component")]
|
||||
[AddComponentMenu("AppleHills/Dialogue/Dialogue Component")]
|
||||
public class DialogueComponent : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private RuntimeDialogueGraph dialogueGraph;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Dialogue
|
||||
Typewriter // Display text one character at a time
|
||||
}
|
||||
|
||||
[AddComponentMenu("Apple Hills/Dialogue/Speech Bubble")]
|
||||
[AddComponentMenu("AppleHills/Dialogue/Speech Bubble")]
|
||||
public class SpeechBubble : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private TextMeshProUGUI textDisplay;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
[CreateAssetMenu(fileName = "PickupItemData", menuName = "Game/Pickup Item Data")]
|
||||
[CreateAssetMenu(fileName = "PickupItemData", menuName = "AppleHills/Items + Puzzles/Pickup Item Data")]
|
||||
public class PickupItemData : ScriptableObject
|
||||
{
|
||||
[SerializeField] private string _itemId;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/// <summary>
|
||||
/// ScriptableObject holding data for a level switch (scene name, description, icon).
|
||||
/// </summary>
|
||||
[CreateAssetMenu(fileName = "LevelSwitchData", menuName = "Game/Level Switch Data")]
|
||||
[CreateAssetMenu(fileName = "LevelSwitchData", menuName = "AppleHills/Items & Puzzles/Level Switch Data")]
|
||||
public class LevelSwitchData : ScriptableObject
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||
/// <summary>
|
||||
/// ScriptableObject representing a single puzzle step, its display info, and which steps it unlocks.
|
||||
/// </summary>
|
||||
[CreateAssetMenu(fileName = "PuzzleStepSO", menuName = "Puzzle/Step")]
|
||||
[CreateAssetMenu(fileName = "PuzzleStepSO", menuName = "AppleHills/Items & Puzzles/Step")]
|
||||
public class PuzzleStepSO : ScriptableObject
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
|
||||
namespace Settings
|
||||
{
|
||||
[CreateAssetMenu(fileName = "SceneOrientationConfig", menuName = "Settings/Scene Orientation Config")]
|
||||
[CreateAssetMenu(fileName = "SceneOrientationConfig", menuName = "AppleHills/Settings/Scene Orientation Config")]
|
||||
public class SceneOrientationConfig : ScriptableObject
|
||||
{
|
||||
[System.Serializable]
|
||||
|
||||
Reference in New Issue
Block a user