44 lines
No EOL
1.6 KiB
C#
44 lines
No EOL
1.6 KiB
C#
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace ShiroginSDK.Runtime.Modules.IAP.Scripts.SO
|
|
{
|
|
/// <summary>
|
|
/// Represents a visual or logical group of store items (e.g., "Gem Packs", "Special Offers").
|
|
/// Each section defines its own title, description, layout, and item list.
|
|
/// </summary>
|
|
[CreateAssetMenu(fileName = "StoreSection", menuName = "ShiroginSDK/IAP/Store Section", order = 10)]
|
|
public class StoreSection : ScriptableObject
|
|
{
|
|
[Header("🧾 Section Info")] [Tooltip("Displayed title of this store section.")]
|
|
public string headerTitle;
|
|
|
|
[Tooltip("Displayed description below the section title.")] [TextArea]
|
|
public string headerDescription;
|
|
|
|
[Header("🧱 Layout Type")] [Tooltip("Defines how the items in this section should be displayed in the UI.")]
|
|
public SectionLayoutType layoutType = SectionLayoutType.Vertical;
|
|
|
|
[Header("🛒 Items in this section (Max 3 item if layoutType is Horizontal)")]
|
|
[Tooltip("List of store items included in this section.")]
|
|
public List<StoreItem> items = new();
|
|
|
|
#if UNITY_EDITOR
|
|
private void OnValidate()
|
|
{
|
|
// Clean up any null references to avoid Editor warnings
|
|
items.RemoveAll(i => i == null);
|
|
}
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// Defines the layout orientation of a store section.
|
|
/// Used by UI builders to decide between horizontal or vertical prefabs.
|
|
/// </summary>
|
|
public enum SectionLayoutType
|
|
{
|
|
Horizontal,
|
|
Vertical
|
|
}
|
|
} |