// MIT License - Copyright (c) 2025 wallstop // Full license text: https://github.com/wallstop/unity-helpers/blob/main/LICENSE #if REFLEX_PRESENT namespace WallstopStudios.UnityHelpers.Integrations.Reflex { using System; using WallstopStudios.UnityHelpers.Core.Helper; /// /// Controls how the Reflex integration performs relational component assignment across scenes. /// public readonly struct RelationalSceneAssignmentOptions : IEquatable { /// /// Initializes a new instance of the struct. /// /// /// When true, relational assignment scans include inactive GameObjects. Defaults to true. /// /// /// When true, performs a single-pass scan for relational types to maximize performance. /// Defaults to true. /// public RelationalSceneAssignmentOptions(bool includeInactive, bool useSinglePassScan = true) { IncludeInactive = includeInactive; UseSinglePassScan = useSinglePassScan; } /// /// Gets default options (include inactive objects, single-pass scan). /// public static RelationalSceneAssignmentOptions Default => new(true, true); /// /// Gets whether inactive GameObjects are included during scans. /// public bool IncludeInactive { get; } /// /// Gets whether to use a single-pass scan strategy. /// public bool UseSinglePassScan { get; } /// public bool Equals(RelationalSceneAssignmentOptions other) { return IncludeInactive == other.IncludeInactive && UseSinglePassScan == other.UseSinglePassScan; } /// public override bool Equals(object obj) { return obj is RelationalSceneAssignmentOptions other && Equals(other); } /// public override int GetHashCode() { return Objects.HashCode(IncludeInactive, UseSinglePassScan); } /// /// Equality operator. /// public static bool operator ==( RelationalSceneAssignmentOptions left, RelationalSceneAssignmentOptions right ) { return left.Equals(right); } /// /// Inequality operator. /// public static bool operator !=( RelationalSceneAssignmentOptions left, RelationalSceneAssignmentOptions right ) { return !left.Equals(right); } } } #endif