// MIT License - Copyright (c) 2025 wallstop // Full license text: https://github.com/wallstop/unity-helpers/blob/main/LICENSE namespace WallstopStudios.UnityHelpers.Core.Attributes { using System; using UnityEngine; /// /// Marks a or /// so it is automatically instantiated during Unity start-up. /// [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] public sealed class AutoLoadSingletonAttribute : Attribute { /// /// Initializes a new instance of the class. /// /// /// Unity load phase that should trigger instantiation. Defaults to . /// public AutoLoadSingletonAttribute( RuntimeInitializeLoadType loadType = RuntimeInitializeLoadType.BeforeSplashScreen ) { LoadType = loadType; } /// /// Gets the Unity load phase that should trigger instantiation. The editor serializes this into /// so can reflectively touch the singleton at runtime. /// public RuntimeInitializeLoadType LoadType { get; } } }