namespace FishNet.Object { /// /// Action to take when despawning a NetworkObject. /// public enum DespawnType : byte { Destroy = 0, Pool = 1, } /// /// Current state of the NetworkObject. /// internal enum NetworkObjectState : byte { /// /// State has not been set. This occurs when the object has never been spawned or despawned. /// Unset = 0, /// /// Object is currently spawned. /// Spawned = 1, /// /// Object is currently despawned. /// Despawned = 2, } /// /// Options on retrieving nested NetworkObjects. /// [System.Flags] internal enum GetNetworkObjectOption : int { /// /// Include NetworkObject which nested are being returned for. /// Self = (1 << 0), /// /// Include initialize nested. /// InitializedNested = (1 << 1), /// /// Include runtime nested. /// RuntimeNested = (1 << 2), /// /// Recursively iterate nested includes. /// /// This only functions if Initialized or Runtime is flagged. Recursive = (1 << 3), /// /// Uses InitializedNested and RuntimeNested flags. /// AllNested = (InitializedNested | RuntimeNested), /// /// Uses InitializedNested, RuntimeNested, and Recursive flags. /// AllNestedRecursive = (InitializedNested | RuntimeNested | Recursive), /// /// Sets all flags. /// All = ~0, } internal static class GetNetworkObjectOptionExtensions { /// /// True if whole contains part. /// public static bool FastContains(this GetNetworkObjectOption whole, GetNetworkObjectOption part) => (whole & part) == part; } }