Scylla Framework
  • API Reference
Search Results for

    Show / Hide Table of Contents
    • Scylla.Core
      • Char
      • FileLog
      • ILogReceiver
      • IScyllaDependencyProvider
      • Log
      • LogCategory
      • LogEntry
      • LogFileFormat
      • LogLevel
      • Num
      • ScyllaAAMode
      • ScyllaAAQuality
      • ScyllaBootstrap
      • ScyllaCore
      • ScyllaCore.Meta
      • ScyllaDependencyInfoData
      • ScyllaMaterialSurface
      • ScyllaRenderPipeline
      • ScyllaShadowResolution
      • Str
      • TextAlignment
      • UnityConsoleLog
    • Scylla.Core.Attributes
      • AttributeValidator
      • CompareOperator
      • ConditionalAttributeBase
      • DisableIfAttribute
      • DisplayNameAttribute
      • EnableIfAttribute
      • FoldoutAttribute
      • FormerlySerializedAsAttribute
      • GroupAttribute
      • HideIfAttribute
      • HideInFilterWindowAttribute
      • HorizontalLineAttribute
      • InfoBoxAttribute
      • InfoType
      • LayerFieldAttribute
      • MinMaxRangeAttribute
      • MonoTextAreaAttribute
      • NotEmptyAttribute
      • NotNullAttribute
      • ReadOnlyAttribute
      • ReflectedTypeAttribute
      • RequiredAttribute
      • SceneFieldAttribute
      • ShowIfAttribute
      • SortingLayerFieldAttribute
      • TagFieldAttribute
      • TitleAttribute
      • ValidateInputAttribute
      • ValidationException
    • Scylla.Core.Config
      • ConfigFileManager
      • ConfigurationRegistry
      • ConfigurationSlotAttribute
      • ConfigurationValidationResult
      • ConsoleLoggingSettings
      • FileLogFormattingSettings
      • FileLoggingSettings
      • IConfigurationRegistry
      • ScyllaConfiguration
      • ScyllaCoreConfiguration
      • ScyllaEventConfiguration
      • ScyllaLoggerConfiguration
      • ValidationSeverity
    • Scylla.Core.Editor
      • CalendarDefinitionEditor
      • ClockDefinitionEditor
      • ColorGradientAssetEditor
      • ColorGradientReducer
      • ColorPaletteAssetEditor
      • DebugCameraEditor
      • DebugEventMonitor
      • DependencySourceType
      • DependencyStatus
      • EventFilterCategory
      • EventLogEntry
      • GameViewCapture
      • IScyllaShaderProvider
      • ScyllaAboutWindow
      • ScyllaBootstrapEditor
      • ScyllaCard
      • ScyllaConfigurationEditorBase
      • ScyllaCopyMenu
      • ScyllaCoreConfigurationEditor
      • ScyllaCoreDependencyProvider
      • ScyllaCoreShaderProvider
      • ScyllaDebugWindow
      • ScyllaDependencyDetector
      • ScyllaDependencyGraphElement
      • ScyllaDependencyInfo
      • ScyllaDescriptionBox
      • ScyllaEditorAssetUtil
      • ScyllaEditorAssets
      • ScyllaEditorBase
      • ScyllaEditorClipboard
      • ScyllaEditorColors
      • ScyllaEditorConstants
      • ScyllaEditorIconNames
      • ScyllaEditorLogScope
      • ScyllaEditorPrefs
      • ScyllaEditorStyles
      • ScyllaEditorTheme
      • ScyllaEditorUSSClasses
      • ScyllaEventConfigurationEditor
      • ScyllaFontCharacterExtractorWindow
      • ScyllaGettingStartedWindow
      • ScyllaIconPreview
      • ScyllaLoggerConfigurationEditor
      • ScyllaLogoElement
      • ScyllaMenuItems
      • ScyllaModuleEditor
      • ScyllaModuleStatusIndicator
      • ScyllaModuleWindow
      • ScyllaNameField
      • ScyllaPanel
      • ScyllaPresetSelector
      • ScyllaSceneConfigurationEditor
      • ScyllaScheduler
      • ScyllaSearchField
      • ScyllaSearchablePopup
      • ScyllaSearchablePopup.Item
      • ScyllaSettingsProvider
      • ScyllaSetupWizard
      • ScyllaShaderInclusionBuildProcessor
      • ScyllaSplitView
      • ScyllaStatusBar
      • ScyllaTabBar
      • ScyllaTimeConfigurationEditor
      • ScyllaToolWindowBase
      • ScyllaToolbar
      • ScyllaValidatedTextField
      • ScyllaWizardWindowBase
      • ScyllaWizardWindowBase.WizardLayout
      • ScyllaWizardWindowBase.WizardStepDef
    • Scylla.Core.Editor.Attributes
      • AttributeReflectionCache
      • ConditionalDrawerBase
      • DisableIfDrawer
      • EnableIfDrawer
      • FoldoutDrawer
      • HideIfDrawer
      • HorizontalLineDrawer
      • InfoBoxDrawer
      • LayerFieldDrawer
      • MinMaxRangeDrawer
      • MonoTextAreaDrawer
      • ReadOnlyDrawer
      • RequiredDrawer
      • SceneFieldDrawer
      • SerializedPropertyExtensions
      • ShowIfDrawer
      • SortingLayerFieldDrawer
      • TagFieldDrawer
      • TitleDrawer
    • Scylla.Core.Editor.Drawers
      • DoubleRangeDrawer
      • FloatRangeDrawer
      • IntRangeDrawer
    • Scylla.Core.Editor.Util.UI.Layout
      • ScyllaUIEdgeInsetsDrawer
      • ScyllaUILayoutMenuItems
      • ScyllaUILengthDrawer
    • Scylla.Core.Events
      • IScyllaEventBus
      • ScyllaEvent
      • ScyllaEventBus
      • ScyllaEventPriority
      • ScyllaEventSubscription
      • ScyllaEvents
      • ScyllaFrameworkInitializedEvent
      • ScyllaFrameworkShutdownEvent
      • ScyllaModuleShutdownEvent
      • ScyllaModuleStartedEvent
    • Scylla.Core.Modules
      • IScyllaModule
      • IScyllaModuleManager
      • ScyllaModule
      • ScyllaModuleDependency
      • ScyllaModuleDependencyType
      • ScyllaModuleException
      • ScyllaModuleID
      • ScyllaModuleInfo
      • ScyllaModuleManager
      • ScyllaModulePlacement
      • ScyllaModuleState
    • Scylla.Core.Scenes
      • HygieneOverride
      • SceneLoadOperation
      • SceneLoadRunner
      • SceneLoadState
      • ScyllaActiveSceneChangedEvent
      • ScyllaSceneConfiguration
      • ScyllaSceneLoadOptions
      • ScyllaSceneLoadProgressEvent
      • ScyllaSceneLoadedEvent
      • ScyllaSceneManager
      • ScyllaSceneUnloadedEvent
      • ScyllaSceneWillLoadEvent
      • ScyllaSceneWillUnloadEvent
    • Scylla.Core.Settings
      • ScyllaProjectSettings
    • Scylla.Core.Structures
      • FractionalHexCoord
      • GridUtil
      • HexCoord
      • HexCornerCoord
      • HexCornerMap<TData>
      • HexCornerMap<TData>.Enumerator
      • HexCornerPosition
      • HexEdgeCoord
      • HexEdgeDirection
      • HexEdgeMap<TData>
      • HexEdgeMap<TData>.Enumerator
      • HexGridLayout
      • HexLayoutMode
      • HexOrientation
      • IScyllaCollection
      • IScyllaCollection<T>
      • IScyllaGraph
      • IScyllaGrid<TCoord, TCell>
      • IScyllaMap<TKey, TValue>
      • IScyllaMutableGraph
      • IScyllaMutableGraph<TNodeData>
      • IScyllaMutableGraph<TNodeData, TEdgeData>
      • IScyllaPausableState<TContext>
      • IScyllaPriorityQueueItem
      • IScyllaReadOnlyGraph
      • IScyllaReadOnlyGraph<TNodeData>
      • IScyllaReadOnlyGraph<TNodeData, TEdgeData>
      • IScyllaState<TContext>
      • IScyllaTransition<TContext>
      • IScyllaTrie
      • IScyllaTrie<TValue>
      • NeighborWriter<TCoord>
      • ScyllaAABB2
      • ScyllaAABB3
      • ScyllaAdjacencyListGraph
      • ScyllaAdjacencyListGraph.Builder
      • ScyllaAdjacencyListGraph.NodeEnumerator
      • ScyllaAdjacencyListGraph.SynchronizedScyllaAdjacencyListGraph
      • ScyllaAdjacencyListGraph<TNodeData>
      • ScyllaAdjacencyListGraph<TNodeData, TEdgeData>
      • ScyllaBVH
      • ScyllaBVH.Builder
      • ScyllaBVHCore
      • ScyllaBitArray
      • ScyllaBitArray.Builder
      • ScyllaBitArray.Enumerator
      • ScyllaBitArray.SynchronizedScyllaBitArray
      • ScyllaBitArrayDOTS
      • ScyllaBitArrayDOTS.Builder
      • ScyllaBitArrayDOTS.Enumerator
      • ScyllaCSRGraph
      • ScyllaCSRGraph.Builder
      • ScyllaCSRGraph<TNodeData>
      • ScyllaCSRGraph<TNodeData, TEdgeData>
      • ScyllaCollectionCapabilities
      • ScyllaCollectionThreadSafety
      • ScyllaCompositeState<TContext>
      • ScyllaDequeDOTS<T>
      • ScyllaDequeDOTS<T>.Builder
      • ScyllaDeque<T>
      • ScyllaDeque<T>.Builder
      • ScyllaDeque<T>.Enumerator
      • ScyllaDeque<T>.SynchronizedScyllaDeque
      • ScyllaDisjointSet
      • ScyllaDisjointSet.Builder
      • ScyllaDisjointSet.SynchronizedScyllaDisjointSet
      • ScyllaDisjointSetDOTS
      • ScyllaDisjointSetDOTS.Builder
      • ScyllaGenericObjectPool<T>
      • ScyllaGenericObjectPool<T>.Builder
      • ScyllaGenericObjectPool<T>.Enumerator
      • ScyllaGenericObjectPool<T>.SynchronizedScyllaGenericObjectPool
      • ScyllaGraphAlgorithms
      • ScyllaGraphDOTS
      • ScyllaGraphDOTS.Builder
      • ScyllaGraphEdge
      • ScyllaGraphEdge<TEdgeData>
      • ScyllaGraphNode
      • ScyllaGraphNodeFlags
      • ScyllaGraphPath
      • ScyllaGraphProperties
      • ScyllaGraphSearchState
      • ScyllaGridGraphAdapter<TCoord, TCell>
      • ScyllaHexGrid<TCell>
      • ScyllaHexGrid<TCell>.Builder
      • ScyllaHexGrid<TCell>.Enumerator
      • ScyllaHexGrid<TCell>.SynchronizedScyllaHexGrid
      • ScyllaHierarchicalStateMachine<TContext>
      • ScyllaKDTree3
      • ScyllaKDTree3.Builder
      • ScyllaKDTree3Core
      • ScyllaKDTree3Core.Node
      • ScyllaLayeredStateMachine<TContext>
      • ScyllaLooseOctree
      • ScyllaLooseOctree.Builder
      • ScyllaLooseOctreeCore
      • ScyllaLooseOctreeUtil
      • ScyllaLooseOctree<T>
      • ScyllaLooseQuadtree
      • ScyllaLooseQuadtree.Builder
      • ScyllaLooseQuadtreeCore
      • ScyllaLooseQuadtreeUtil
      • ScyllaLooseQuadtree<T>
      • ScyllaMapDOTS<TKey, TValue>
      • ScyllaMapDOTS<TKey, TValue>.Builder
      • ScyllaMapEntry<TKey, TValue>
      • ScyllaMap<TKey, TValue>
      • ScyllaMap<TKey, TValue>.Builder
      • ScyllaMap<TKey, TValue>.Enumerator
      • ScyllaMap<TKey, TValue>.SynchronizedScyllaMap
      • ScyllaObjectPool<T>
      • ScyllaObjectPool<T>.Builder
      • ScyllaObjectPool<T>.Enumerator
      • ScyllaObjectPool<T>.SynchronizedScyllaObjectPool
      • ScyllaPausableStateBase<TContext>
      • ScyllaPriorityQueueDOTS<TValue>
      • ScyllaPriorityQueueDOTS<TValue>.Builder
      • ScyllaPriorityQueueItemComparer<T>
      • ScyllaPriorityQueueNode<TValue>
      • ScyllaPriorityQueueOrder
      • ScyllaPriorityQueue<T>
      • ScyllaPriorityQueue<T>.Builder
      • ScyllaPriorityQueue<T>.Enumerator
      • ScyllaPriorityQueue<T>.SynchronizedScyllaPriorityQueue
      • ScyllaPushdownStateMachine<TContext>
      • ScyllaQuadtreePlane
      • ScyllaQueueDOTS<T>
      • ScyllaQueueDOTS<T>.Builder
      • ScyllaQueue<T>
      • ScyllaQueue<T>.Builder
      • ScyllaQueue<T>.Enumerator
      • ScyllaQueue<T>.SynchronizedScyllaQueue
      • ScyllaRay3
      • ScyllaRingBufferDOTS<T>
      • ScyllaRingBufferDOTS<T>.Builder
      • ScyllaRingBufferDOTS<T>.Enumerator
      • ScyllaRingBufferDOTS<T>.ReverseEnumerable
      • ScyllaRingBufferDOTS<T>.ReverseEnumerator
      • ScyllaRingBuffer<T>
      • ScyllaRingBuffer<T>.Builder
      • ScyllaRingBuffer<T>.Enumerator
      • ScyllaRingBuffer<T>.ReverseEnumerable
      • ScyllaRingBuffer<T>.ReverseEnumerator
      • ScyllaRingBuffer<T>.SynchronizedScyllaRingBuffer
      • ScyllaSparseHexGrid<TCell>
      • ScyllaSparseHexGrid<TCell>.Builder
      • ScyllaSparseHexGrid<TCell>.Enumerator
      • ScyllaSparseHexGrid<TCell>.SynchronizedScyllaSparseHexGrid
      • ScyllaSparseSquareGrid<TCell>
      • ScyllaSparseSquareGrid<TCell>.Builder
      • ScyllaSparseSquareGrid<TCell>.Enumerator
      • ScyllaSparseSquareGrid<TCell>.SynchronizedScyllaSparseSquareGrid
      • ScyllaSparseTriGrid<TCell>
      • ScyllaSparseTriGrid<TCell>.Builder
      • ScyllaSparseTriGrid<TCell>.Enumerator
      • ScyllaSparseTriGrid<TCell>.SynchronizedScyllaSparseTriGrid
      • ScyllaSquareGrid<TCell>
      • ScyllaSquareGrid<TCell>.Builder
      • ScyllaSquareGrid<TCell>.Enumerator
      • ScyllaSquareGrid<TCell>.SynchronizedScyllaSquareGrid
      • ScyllaStackDOTS<T>
      • ScyllaStackDOTS<T>.Builder
      • ScyllaStack<T>
      • ScyllaStack<T>.Builder
      • ScyllaStack<T>.Enumerator
      • ScyllaStack<T>.SynchronizedScyllaStack
      • ScyllaStateBase<TContext>
      • ScyllaStateMachine<TContext>
      • ScyllaTransition<TContext>
      • ScyllaTriGrid<TCell>
      • ScyllaTriGrid<TCell>.Builder
      • ScyllaTriGrid<TCell>.Enumerator
      • ScyllaTriGrid<TCell>.SynchronizedScyllaTriGrid
      • ScyllaTrie
      • ScyllaTrie.Builder
      • ScyllaTrie.SynchronizedScyllaTrie
      • ScyllaTrie<TValue>
      • ScyllaTrie<TValue>.Builder
      • ScyllaTrie<TValue>.SynchronizedScyllaTrie
      • ScyllaTypeMap
      • ScyllaTypeMap.Builder
      • ScyllaTypeMap.DiagnosticEntry
      • ScyllaTypeMap.SynchronizedScyllaTypeMap
      • SerializableDictionary<TKey, TValue>
      • SquareAdjacency
      • SquareCoord
      • SquareCornerCoord
      • SquareCornerMap<TData>
      • SquareCornerMap<TData>.Enumerator
      • SquareDistanceMetric
      • SquareEdgeCoord
      • SquareEdgeDirection
      • SquareEdgeMap<TData>
      • SquareEdgeMap<TData>.Enumerator
      • SquareGridLayout
      • TriCoord
      • TriCornerCoord
      • TriCornerMap<TData>
      • TriCornerMap<TData>.Enumerator
      • TriEdgeCoord
      • TriEdgeDirection
      • TriEdgeMap<TData>
      • TriEdgeMap<TData>.Enumerator
      • TriGridLayout
    • Scylla.Core.Time
      • CalendarDefinition
      • CalendarMath
      • ClockDayChangedEvent
      • ClockDebugInfo
      • ClockDefinition
      • ClockEraChangedEvent
      • ClockEvent
      • ClockEventKind
      • ClockHourChangedEvent
      • ClockMinuteChangedEvent
      • ClockMonthChangedEvent
      • ClockPausedEvent
      • ClockRegisteredEvent
      • ClockResumedEvent
      • ClockSeasonChangedEvent
      • ClockSecondChangedEvent
      • ClockState
      • ClockTickEvent
      • ClockTimeScaleChangedEvent
      • ClockUnregisteredEvent
      • ClockWeekdayChangedEvent
      • ClockYearChangedEvent
      • EraDefinition
      • GameDate
      • IClockListener
      • IClockSource
      • IEraConditionProvider
      • ILocationProfile
      • INetworkTimeSyncStrategy
      • ITimeListener
      • LeapYearRule
      • MasterTimeState
      • MonthDefinition
      • PauseMode
      • ScheduleExtensions
      • ScheduleMode
      • ScheduledTickHandle
      • ScyllaClock
      • ScyllaTime
      • ScyllaTimeConfiguration
      • ScyllaTimeDebugInfo
      • SeasonDefinition
      • SmoothTimeScaleTransition
      • TimeEffectHandle
      • TimeEffects
      • TimeEvent
      • TimeScaleBlendMode
      • TimeScaleModifier
      • TimeScaleModifierHandle
      • TimeScaleModifierStack
      • TimeScaleModifierState
      • TimeTickRunner
      • WeekdayDefinition
    • Scylla.Core.Util
      • ArrayUtil
      • AssemblyUtil
      • CameraUtil
      • CollectionUtil
      • ColorUtil
      • ComponentUtil
      • DateUtil
      • DebugCamera
      • FontUtil
      • FontVariant
      • GameObjectExtensions
      • GameObjectUtil
      • InterfaceUtil
      • Interpolation
      • LightUtil
      • LitMaterialDescriptor
      • ManualResetEventEx
      • MaterialUtil
      • NumberExtensions
      • NumberUtil
      • OptionalPackages
      • PlatformUtil
      • ResourceUtil
      • SpriteUtil
      • StringUtil
      • TabularText
      • TabularText.Builder
      • TestTextGenerator
      • ThreadUtil
      • TimeUtil
      • Timer
      • TransformExtensions
      • TypeUtil
      • UnicodeRange
      • VirtualTransform
    • Scylla.Core.Util.Addressables
      • AddressableErrorCode
      • AddressableException
      • AddressableExtensions
      • AddressableProgress
      • AddressableResult
      • AddressableResult<T>
      • AddressableSettings
      • ManagedAddressableList<T>
      • ManagedAddressable<T>
      • ScyllaAddressables
    • Scylla.Core.Util.Checksum
      • ChecksumAdler32
      • ChecksumCRC16
      • ChecksumCRC32
      • ChecksumFletcher32
      • ChecksumXXHash32
      • ChecksumXXHash64
      • IChecksum
    • Scylla.Core.Util.Compression
      • ArchiveEntryInfo
      • CompressionAlgorithm
      • CompressionErrorCode
      • CompressionException
      • CompressionExtensions
      • CompressionLevel
      • CompressionProgress
      • CompressionResult
      • CompressionResult<T>
      • CompressionSettings
      • IArchiveProvider
      • ICompressionProvider
      • ScyllaCompression
    • Scylla.Core.Util.Crypto
      • CryptoAlgorithm
      • CryptoErrorCode
      • CryptoException
      • CryptoExtensions
      • CryptoSettings
      • ICryptoProvider
      • KeyDerivationHash
      • KeyDerivationSettings
      • ScyllaCrypto
    • Scylla.Core.Util.DebugDraw
      • DebugDraw
      • DebugDrawSpace
      • DebugDrawTextAlign
    • Scylla.Core.Util.Effects
      • ColorAnimationText
      • ColorAnimationTextDirection
      • ColorAnimationTextGradient
    • Scylla.Core.Util.File
      • ConfigFile
      • ConfigFileGroup
      • ConfigFileProperty
      • ConfigFilePropertyType
      • ConfigFileUtil
      • FileErrorCode
      • FileException
      • FileExtensions
      • FilePathExtensions
      • FilePathUtil
      • FileProgress
      • FileSettings
      • ImageFileFormat
      • ImageFileSettings
      • ScyllaFileUtil
    • Scylla.Core.Util.Geom
      • AABB3D
      • BarrelColoringMode
      • BollardColoringMode
      • CappedWallColoringMode
      • Capsule3D
      • ColliderMode
      • CrateColoringMode
      • Ellipse
      • FaceColoringMode
      • IFaceColorResolver
      • OBB3D
      • PaletteFaceColorResolver
      • PaneledWall1ColoringMode
      • PaneledWall2ColoringMode
      • PipeSegmentColoringMode
      • RoundedBoxColoringMode
      • ScyllaArchwayShape
      • ScyllaBarrelShape
      • ScyllaBollardShape
      • ScyllaBoxShape
      • ScyllaCappedWallShape
      • ScyllaCapsuleShape
      • ScyllaColumnShape
      • ScyllaConeShape
      • ScyllaCrateShape
      • ScyllaCurvedStairsShape
      • ScyllaCylinderShape
      • ScyllaDomeShape
      • ScyllaFloorTileShape
      • ScyllaIcoSphereShape
      • ScyllaLadderShape
      • ScyllaLinearStairsShape
      • ScyllaOctahedronShape
      • ScyllaPaneledWall1Shape
      • ScyllaPaneledWall2Shape
      • ScyllaPipeSegmentShape
      • ScyllaPipeShape
      • ScyllaPlaneShape
      • ScyllaPyramidShape
      • ScyllaQuadShape
      • ScyllaRampShape
      • ScyllaRingShape
      • ScyllaRoundedBoxShape
      • ScyllaShapeBase3D
      • ScyllaShapes
      • ScyllaShelvedWallShape
      • ScyllaSignShape
      • ScyllaSkirtedWallShape
      • ScyllaSkyDomeShape
      • ScyllaSphereShape
      • ScyllaSpiralStairsShape
      • ScyllaTorusShape
      • ScyllaTriangularPrismShape
      • ScyllaWallShape
      • ScyllaWallWithDoorShape
      • ScyllaWallWithWindowShape
      • ShapeMaterialCache
      • ShelvedWallColoringMode
      • SignColoringMode
      • Size2D
      • Size3D
      • SkirtedWallColoringMode
      • Sphere3D
      • StairsColoringMode
      • UniformColorResolver
    • Scylla.Core.Util.Math
      • Complex
      • MathUtil
      • Monomial
      • Polynomial
    • Scylla.Core.Util.Noise
      • CellularDistanceType
      • CellularReturnType
      • CellularSettings
      • FractalType
      • NoiseAlgorithm
      • NoiseCurlSampler
      • NoiseDomainWarper
      • NoiseGenerator
      • NoiseSettings
      • PixelNoise
      • PixelNoiseDistribution
      • PixelNoiseSettings
      • WarpSettings
    • Scylla.Core.Util.Palette
      • ColorAssetRegistry
      • ColorGradient
      • ColorGradientAlphaStop
      • ColorGradientAlphaStopData
      • ColorGradientAsset
      • ColorGradientColorSpace
      • ColorGradientData
      • ColorGradientMode
      • ColorGradientStop
      • ColorGradientStopData
      • ColorGradientStopInterpolation
      • ColorPalette
      • ColorPaletteAsset
      • ColorPaletteData
      • ColorPaletteEntry
      • ColorPaletteEntryData
      • ColorPaletteMapping
      • ColorRole
      • ColorStopBlendMode
      • ColorSwatchCollection
      • ColorSwatchCollectionAsset
      • ColorSwatchCollectionData
      • ColorSwatchEntryData
      • MutableColorGradient
      • MutableColorPalette
    • Scylla.Core.Util.ProceduralMapGen
      • BSPSettings
      • CellularAutomataSettings
      • CorridorStyle
      • DoorAxis
      • DoorPlacement
      • DoorPlacementSettings
      • DoorShapeConfig
      • DrunkardWalkSettings
      • FloorplanSettings
      • InstantiationResult
      • MapCellType
      • MapCorridor<TCoord>
      • MapGenResult<TCoord>
      • MapGenSettings
      • MapOverlaySettings
      • MapPatternType
      • MapRoom<TCoord>
      • MazeRoomSettings
      • MazeSettings
      • NoiseThresholdSettings
      • ProceduralMapGenerator
      • ProceduralMapOverlay
      • ProceduralMapPostProcessor
      • RoomCorridorSettings
      • RoomGroup
      • ScyllaProceduralMapInstantiator
      • VoronoiRegionSettings
      • WindingCorridorSettings
    • Scylla.Core.Util.Random
      • AliasTable
      • CryptoRandomSource
      • DiceRoll
      • IProbabilityInfluence
      • IRandomSource
      • MersenneTwister
      • MersenneTwisterState
      • PCG32
      • PCG32State
      • PickHistory
      • PickRecord
      • PoissonDiskSampler
      • PoissonDiskSampler.BoundChecker
      • ProbabilityEntry<T>
      • ProbabilityList<T>
      • ProbabilityNormalizer
      • RandomAlgorithm
      • RandomExtensions
      • RandomID
      • RandomSeeder
      • RandomText
      • RandomUtil
      • RandomUtil.DeterministicRNG
      • RandomUtil.DeterministicRNGState
      • RepeatPreventionMode
      • SelectionStrategy
      • SplitMix64RNG
      • SplitMix64State
      • SystemRandomSource
      • UnityRandomSource
      • Xoroshiro128Plus
      • Xoroshiro128State
      • Xoshiro256StarStar
      • Xoshiro256State
    • Scylla.Core.Util.Ranges
      • DoubleRange
      • FloatRange
      • IntRange
    • Scylla.Core.Util.Serialization
      • ArraySerializer<T>
      • BoolSerializer
      • BoundsSerializer
      • ByteArraySerializer
      • ByteSerializer
      • CharSerializer
      • Color32Serializer
      • ColorSerializer
      • DateTimeOffsetSerializer
      • DateTimeSerializer
      • DecimalSerializer
      • DefaultValueHandling
      • DictionarySerializer<TKey, TValue>
      • DoubleSerializer
      • EnumSerializer<T>
      • FloatSerializer
      • GuidSerializer
      • HashSetSerializer<T>
      • IScyllaReader
      • IScyllaWriter
      • ISerializationContext
      • ITypeSerializer
      • ITypeSerializer<T>
      • IntSerializer
      • LayerMaskSerializer
      • ListSerializer<T>
      • LongSerializer
      • NullHandling
      • PropertyMetadata
      • QuaternionSerializer
      • QueueSerializer<T>
      • RectIntSerializer
      • RectSerializer
      • ReferenceHandling
      • ReferenceTracker
      • ReflectionSerializer
      • SByteSerializer
      • ScyllaIgnoreAttribute
      • ScyllaIncludeAttribute
      • ScyllaJSONReader
      • ScyllaJSONWriter
      • ScyllaMigrationAttribute
      • ScyllaPropertyAttribute
      • ScyllaSerializableAttribute
      • ScyllaSerialization
      • SerializationContext
      • SerializationEngine
      • SerializationException
      • SerializationFormat
      • SerializationResult
      • SerializationResult<T>
      • SerializationSettings
      • SerializationSettings.Builder
      • SerializationToken
      • ShortSerializer
      • StackSerializer<T>
      • StringSerializer
      • TimeSpanSerializer
      • TypeMetadata
      • TypeMetadataCache
      • TypeSerializerAdapter<T>
      • TypeSerializerBase<T>
      • UIntSerializer
      • ULongSerializer
      • UShortSerializer
      • Vector2IntSerializer
      • Vector2Serializer
      • Vector3IntSerializer
      • Vector3Serializer
      • Vector4Serializer
    • Scylla.Core.Util.Tween
      • Ease
      • EaseType
      • ITween
      • LoopType
      • ScyllaShapeTweenExtensions
      • ScyllaTween
      • SequenceItem
      • SequenceItemType
      • TweenAudioSourceExtensions
      • TweenBase
      • TweenCanvasGroupExtensions
      • TweenColor
      • TweenErrorCode
      • TweenException
      • TweenExtensions
      • TweenFloat
      • TweenID
      • TweenLerp
      • TweenManager
      • TweenMaterialExtensions
      • TweenPool
      • TweenQuaternion
      • TweenRectTransformExtensions
      • TweenSequence
      • TweenSettings
      • TweenSpriteRendererExtensions
      • TweenState
      • TweenTransformExtensions
      • TweenVector2
      • TweenVector3
      • TweenVector4
      • Tween<T>
    • Scylla.Core.Util.UI
      • DebugCanvasUtil
      • GradientBackground
      • IUIText
      • IUITextField
      • LineScrollTextArea
      • LineScrollTextAreaBuilder
      • LineScrollTextBuffer
      • LineScrollTextBuffer.Builder
      • LineScrollTextBuffer.LogicalLine
      • LineScrollTextBufferLineAddedEvent
      • LineScrollTextBufferScrolledEvent
      • LineScrollWindow
      • LineScrollWindow.Enumerator
      • ScrollDirection
      • ScrollPhysics
      • ScrollTextArea
      • ScrollTextAreaBuilder
      • ScrollTextAreaDragEndedEvent
      • ScrollTextAreaDragStartedEvent
      • ScrollTextAreaScrolledEvent
      • ScrollTextBuffer
      • ScrollTextBuffer.Builder
      • ScrollTextBuffer.ScrollTextLine
      • ScrollTextBufferLineAddedEvent
      • ScrollTextLineView
      • ScyllaScrollRect
      • ScyllaUIAdaptiveStack
      • ScyllaUIAlignment
      • ScyllaUIAspectBreakpoint
      • ScyllaUICrossAlignment
      • ScyllaUIEdgeInsets
      • ScyllaUIFitMode
      • ScyllaUIFlexElement
      • ScyllaUIGrid
      • ScyllaUIGridItem
      • ScyllaUIHStack
      • ScyllaUILayoutAnimator
      • ScyllaUILayoutDebugDraw
      • ScyllaUILayoutDebugDrawConfig
      • ScyllaUILayoutGizmos
      • ScyllaUILayoutRoot
      • ScyllaUILayoutStyle
      • ScyllaUILength
      • ScyllaUILengthUnit
      • ScyllaUIPositioned
      • ScyllaUIScreenMargin
      • ScyllaUISizeMode
      • ScyllaUISpacer
      • ScyllaUIStackBase
      • ScyllaUIText
      • ScyllaUITextGroup
      • ScyllaUITrack
      • ScyllaUITrackSizingMode
      • ScyllaUIVStack
      • ScyllaUIZStack
      • TMPSettings
      • TMPUtil
      • TextSelectionPosition
      • TextSelectionRange
      • UIAlignment
      • UIAnchor
      • UIAnchors
      • UIFontReference
      • UIFontStyle
      • UIMargin
      • UIPadding
      • UITextBuilder
      • UITextComponent
      • UITextFactory
      • UITextFieldBuilder
      • UITextFieldComponent
      • UIUtil
      • VisualLine
    • Scylla.Core.Util.Units
      • AreaUnit
      • DataUnit
      • LengthUnit
      • MassUnit
      • PressureUnit
      • SpeedUnit
      • TemperatureUnit
      • TimeFormat
      • TimeUnit

    Struct DataUnit

    Encapsulates a data size, stored internally in bytes, and provides properties that allow for conversions and interactions between multiple standard and binary data size units.

    Implements
    IEquatable<DataUnit>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Scylla.Core.Util.Units
    Assembly: ScyllaCore.dll
    Syntax
    public struct DataUnit : IEquatable<DataUnit>
    Remarks

    DataUnit uses double precision throughout, which is sufficient for representing sizes from single bits up to quettabytes (10^30 bytes) without loss of practical accuracy.

    Two sets of unit prefixes are supported:

    • SI (decimal, powers of 1000): kB, MB, GB, TB, PB, EB, ZB, YB, RB, QB, and their bit equivalents (kb, Mb, Gb, etc.).
    • IEC (binary, powers of 1024): KiB, MiB, GiB, TiB, PiB, EiB, ZiB, YiB.

    All values must be non-negative. Setting any property to a negative, infinite, or NaN value will throw an ArgumentOutOfRangeException via NumberUtil.EnsureFiniteNonNegative.

    Equality comparisons use NumberUtil.Approximately to guard against floating-point rounding artifacts when converting between units. Ordering operators use exact byte-level comparison.

    The ToString() override automatically selects the most human-readable SI byte unit for the stored value, falling back to bits and nibbles for sub-byte quantities.

    var size = new DataUnit();
    size.Megabyte = 1.5;
    Console.WriteLine(size.Kilobyte);   // 1500
    Console.WriteLine(size.Mebibyte);   // ~1.43 (binary conversion)
    Console.WriteLine(size);            // "1.5 MB"
    

    var a = new DataUnit { Gigabyte = 2 }; var b = new DataUnit { Gigabyte = 1 }; var c = a - b; // 1 GB var ratio = a / b; // 2.0

    Constructors

    DataUnit(double)

    Initializes a new DataUnit instance with the given size in bytes.

    Declaration
    public DataUnit(double bytes = 0)
    Parameters
    Type Name Description
    double bytes

    The initial data size in bytes. Must be finite and non-negative. Defaults to 0 (zero bytes).

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if bytes is negative, NaN, or infinite.

    Properties

    Bit

    Gets or sets the data size expressed in bits, where 8 bits equal one byte. Setting this property converts the given bit count to an equivalent byte value and stores it internally. The value must be finite and non-negative.

    Declaration
    public double Bit { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Byte

    Gets or sets the data size expressed in bytes, which is the canonical internal storage unit for DataUnit. Reading this property returns the raw stored value without conversion. Setting it validates and stores the new byte count directly. The value must be finite and non-negative.

    Declaration
    public double Byte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Exabit

    Gets or sets the data size expressed in exabits (Eb) using the SI decimal convention, where 1 Eb = 1000^6 bits.

    Declaration
    public double Exabit { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Exabyte

    Gets or sets the data size expressed in exabytes (EB) using the SI decimal convention, where 1 EB = 1000^6 bytes. For the binary equivalent, use Exbibyte instead.

    Declaration
    public double Exabyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Exbibyte

    Gets or sets the data size expressed in exbibytes (EiB) using the IEC binary convention, where 1 EiB = 1024^6 bytes. For the SI decimal equivalent, use Exabyte instead.

    Declaration
    public double Exbibyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Gibibyte

    Gets or sets the data size expressed in gibibytes (GiB) using the IEC binary convention, where 1 GiB = 1024^3 bytes (1,073,741,824 bytes). For the SI decimal equivalent, use Gigabyte instead.

    Declaration
    public double Gibibyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Gigabit

    Gets or sets the data size expressed in gigabits (Gb) using the SI decimal convention, where 1 Gb = 1,000,000,000 bits (1000^3).

    Declaration
    public double Gigabit { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Gigabyte

    Gets or sets the data size expressed in gigabytes (GB) using the SI decimal convention, where 1 GB = 1,000,000,000 bytes (1000^3). For the binary equivalent, use Gibibyte instead.

    Declaration
    public double Gigabyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Kibibyte

    Gets or sets the data size expressed in kibibytes (KiB) using the IEC binary convention, where 1 KiB = 1024 bytes (2^10). Use this property when working with memory sizes or file-system allocations that follow powers-of-1024 counting. For the SI decimal equivalent, use Kilobyte instead.

    Declaration
    public double Kibibyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Kilobit

    Gets or sets the data size expressed in kilobits (kb) using the SI decimal convention, where 1 kb = 1,000 bits. Kilobits are commonly used for expressing network transfer speeds (e.g., 100 kb/s).

    Declaration
    public double Kilobit { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Kilobyte

    Gets or sets the data size expressed in kilobytes (kB) using the SI decimal convention, where 1 kB = 1,000 bytes. For the binary equivalent using powers of 1024, use Kibibyte instead.

    Declaration
    public double Kilobyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Mebibyte

    Gets or sets the data size expressed in mebibytes (MiB) using the IEC binary convention, where 1 MiB = 1024^2 bytes (1,048,576 bytes). For the SI decimal equivalent, use Megabyte instead.

    Declaration
    public double Mebibyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Megabit

    Gets or sets the data size expressed in megabits (Mb) using the SI decimal convention, where 1 Mb = 1,000,000 bits (1000^2). Megabits are widely used for internet connection speeds (e.g., 100 Mb/s broadband).

    Declaration
    public double Megabit { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Megabyte

    Gets or sets the data size expressed in megabytes (MB) using the SI decimal convention, where 1 MB = 1,000,000 bytes (1000^2). For the binary equivalent, use Mebibyte instead.

    Declaration
    public double Megabyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Nibble

    Gets or sets the data size expressed in nibbles, where one nibble equals 4 bits (half a byte). Two nibbles make up one byte. Setting this property converts the nibble count to bytes for internal storage. The value must be finite and non-negative.

    Declaration
    public double Nibble { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Pebibyte

    Gets or sets the data size expressed in pebibytes (PiB) using the IEC binary convention, where 1 PiB = 1024^5 bytes. For the SI decimal equivalent, use Petabyte instead.

    Declaration
    public double Pebibyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Petabit

    Gets or sets the data size expressed in petabits (Pb) using the SI decimal convention, where 1 Pb = 1000^5 bits.

    Declaration
    public double Petabit { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Petabyte

    Gets or sets the data size expressed in petabytes (PB) using the SI decimal convention, where 1 PB = 1000^5 bytes. For the binary equivalent, use Pebibyte instead.

    Declaration
    public double Petabyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Quettabit

    Gets or sets the data size expressed in quettabits (Qb) using the SI decimal convention, where 1 Qb = 1000^10 bits. This is the largest named SI bit-scale prefix.

    Declaration
    public double Quettabit { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Quettabyte

    Gets or sets the data size expressed in quettabytes (QB) using the SI decimal convention, where 1 QB = 1000^10 bytes. Quettabyte is the largest named SI prefix for data (introduced in 2022), representing 10^30 bytes.

    Declaration
    public double Quettabyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Ronnabit

    Gets or sets the data size expressed in ronnabits (Rb) using the SI decimal convention, where 1 Rb = 1000^9 bits.

    Declaration
    public double Ronnabit { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Ronnabyte

    Gets or sets the data size expressed in ronnabytes (RB) using the SI decimal convention, where 1 RB = 1000^9 bytes. Ronnabyte is an SI prefix introduced in 2022 for use at planetary-scale data magnitudes.

    Declaration
    public double Ronnabyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Tebibyte

    Gets or sets the data size expressed in tebibytes (TiB) using the IEC binary convention, where 1 TiB = 1024^4 bytes. For the SI decimal equivalent, use Terabyte instead.

    Declaration
    public double Tebibyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Terabit

    Gets or sets the data size expressed in terabits (Tb) using the SI decimal convention, where 1 Tb = 1000^4 bits.

    Declaration
    public double Terabit { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Terabyte

    Gets or sets the data size expressed in terabytes (TB) using the SI decimal convention, where 1 TB = 1000^4 bytes. For the binary equivalent, use Tebibyte instead.

    Declaration
    public double Terabyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Yobibyte

    Gets or sets the data size expressed in yobibytes (YiB) using the IEC binary convention, where 1 YiB = 1024^8 bytes. This is the largest standardized IEC binary prefix. For the SI decimal equivalent, use Yottabyte instead.

    Declaration
    public double Yobibyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Yottabit

    Gets or sets the data size expressed in yottabits (Yb) using the SI decimal convention, where 1 Yb = 1000^8 bits.

    Declaration
    public double Yottabit { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Yottabyte

    Gets or sets the data size expressed in yottabytes (YB) using the SI decimal convention, where 1 YB = 1000^8 bytes. For the binary equivalent, use Yobibyte instead.

    Declaration
    public double Yottabyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Zebibyte

    Gets or sets the data size expressed in zebibytes (ZiB) using the IEC binary convention, where 1 ZiB = 1024^7 bytes. For the SI decimal equivalent, use Zettabyte instead.

    Declaration
    public double Zebibyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Zettabit

    Gets or sets the data size expressed in zettabits (Zb) using the SI decimal convention, where 1 Zb = 1000^7 bits.

    Declaration
    public double Zettabit { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Zettabyte

    Gets or sets the data size expressed in zettabytes (ZB) using the SI decimal convention, where 1 ZB = 1000^7 bytes. For the binary equivalent, use Zebibyte instead.

    Declaration
    public double Zettabyte { get; set; }
    Property Value
    Type Description
    double
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown by the setter if the assigned value is negative, NaN, or infinite.

    Methods

    Equals(DataUnit)

    Determines whether the specified DataUnit is equal to this instance. Comparison is performed using NumberUtil.Approximately on the raw byte counts to tolerate floating-point rounding from repeated unit conversions.

    Declaration
    public bool Equals(DataUnit other)
    Parameters
    Type Name Description
    DataUnit other

    The DataUnit to compare with this instance.

    Returns
    Type Description
    bool

    true if other has an approximately equal byte count; otherwise, false.

    Equals(object)

    Determines whether the specified object is equal to this DataUnit instance. Only returns true when obj is itself a DataUnit with an approximately equal byte count.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with this instance. May be null.

    Returns
    Type Description
    bool

    true if obj is a DataUnit whose byte count is approximately equal to this instance; otherwise, false.

    Overrides
    ValueType.Equals(object)

    GetHashCode()

    Returns a hash code derived from the raw byte count of this instance, suitable for use in hash tables and dictionaries.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A 32-bit integer hash code based on the internal double byte value. Note that two instances considered equal via Equals(DataUnit) (approximate comparison) may produce different hash codes when their raw byte values differ by a sub-epsilon amount.

    Overrides
    ValueType.GetHashCode()

    ToString()

    Returns a human-readable string that expresses the stored size in the most appropriate SI byte unit for the current magnitude.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A formatted string such as "1.5 MB", "512 kB", or "3 byte".

    Selection logic from smallest to largest:

    • Exactly zero: returns "0 byte".
    • Less than 0.5 bytes: expressed in bits (e.g., "4 bit").
    • Between 0.5 and 1 byte: expressed in nibbles (e.g., "1 nibble").
    • 1 byte and above: the largest applicable SI decimal unit is chosen (byte, kB, MB, GB, TB, PB, EB, ZB, YB, RB, QB).

    Numeric formatting uses two decimal places for values below 10, one decimal place for values below 100, and zero decimal places otherwise. Trailing zeros and redundant decimal points are trimmed.

    Overrides
    ValueType.ToString()

    Operators

    operator +(DataUnit, DataUnit)

    Adds two DataUnit instances together, combining their byte values.

    Declaration
    public static DataUnit operator +(DataUnit left, DataUnit right)
    Parameters
    Type Name Description
    DataUnit left

    The first operand.

    DataUnit right

    The second operand.

    Returns
    Type Description
    DataUnit

    A new DataUnit whose internal byte count equals the sum of left and right.

    operator /(DataUnit, DataUnit)

    Divides one DataUnit by another, returning the dimensionless ratio of their byte counts as a double. Useful for computing what fraction one size is of another (e.g., how full a buffer is).

    Declaration
    public static double operator /(DataUnit left, DataUnit right)
    Parameters
    Type Name Description
    DataUnit left

    The dividend.

    DataUnit right

    The divisor. Must represent a non-zero byte count.

    Returns
    Type Description
    double

    The ratio left.Byte / right.Byte as a double.

    Exceptions
    Type Condition
    DivideByZeroException

    Thrown if right is zero bytes.

    operator /(DataUnit, double)

    Divides a DataUnit by a double-precision floating-point scalar, producing a proportionally smaller data size.

    Declaration
    public static DataUnit operator /(DataUnit left, double right)
    Parameters
    Type Name Description
    DataUnit left

    The DataUnit dividend.

    double right

    The scalar divisor. Must be a finite, non-zero value greater than zero to keep the result non-negative.

    Returns
    Type Description
    DataUnit

    A new DataUnit whose byte count equals left.Byte / right.

    Exceptions
    Type Condition
    DivideByZeroException

    Thrown if right is exactly zero.

    operator /(DataUnit, int)

    Divides a DataUnit by an integer scalar, producing a proportionally smaller data size.

    Declaration
    public static DataUnit operator /(DataUnit left, int right)
    Parameters
    Type Name Description
    DataUnit left

    The DataUnit dividend.

    int right

    The integer scalar divisor. Must not be zero.

    Returns
    Type Description
    DataUnit

    A new DataUnit whose byte count equals left.Byte / right.

    Exceptions
    Type Condition
    DivideByZeroException

    Thrown if right is zero.

    operator ==(DataUnit, DataUnit)

    Determines whether two DataUnit instances represent the same data size. Uses NumberUtil.Approximately to guard against floating-point rounding artifacts that may arise from unit conversions.

    Declaration
    public static bool operator ==(DataUnit left, DataUnit right)
    Parameters
    Type Name Description
    DataUnit left

    The left operand.

    DataUnit right

    The right operand.

    Returns
    Type Description
    bool

    true if the byte counts of left and right are approximately equal; otherwise, false.

    operator >(DataUnit, DataUnit)

    Determines whether one DataUnit represents a strictly larger data size than another. Uses exact byte-level comparison (not approximate equality).

    Declaration
    public static bool operator >(DataUnit left, DataUnit right)
    Parameters
    Type Name Description
    DataUnit left

    The left operand.

    DataUnit right

    The right operand.

    Returns
    Type Description
    bool

    true if left has more bytes than right; otherwise, false.

    operator >=(DataUnit, DataUnit)

    Determines whether one DataUnit represents a data size that is greater than or equal to another. Uses exact byte-level comparison (not approximate equality).

    Declaration
    public static bool operator >=(DataUnit left, DataUnit right)
    Parameters
    Type Name Description
    DataUnit left

    The left operand.

    DataUnit right

    The right operand.

    Returns
    Type Description
    bool

    true if left has more or the same number of bytes as right; otherwise, false.

    operator !=(DataUnit, DataUnit)

    Determines whether two DataUnit instances represent different data sizes. Uses NumberUtil.Approximately for comparison, mirroring the behaviour of the == operator.

    Declaration
    public static bool operator !=(DataUnit left, DataUnit right)
    Parameters
    Type Name Description
    DataUnit left

    The left operand.

    DataUnit right

    The right operand.

    Returns
    Type Description
    bool

    true if the byte counts of left and right are not approximately equal; otherwise, false.

    operator <(DataUnit, DataUnit)

    Determines whether one DataUnit represents a strictly smaller data size than another. Uses exact byte-level comparison (not approximate equality).

    Declaration
    public static bool operator <(DataUnit left, DataUnit right)
    Parameters
    Type Name Description
    DataUnit left

    The left operand.

    DataUnit right

    The right operand.

    Returns
    Type Description
    bool

    true if left has fewer bytes than right; otherwise, false.

    operator <=(DataUnit, DataUnit)

    Determines whether one DataUnit represents a data size that is less than or equal to another. Uses exact byte-level comparison (not approximate equality).

    Declaration
    public static bool operator <=(DataUnit left, DataUnit right)
    Parameters
    Type Name Description
    DataUnit left

    The left operand.

    DataUnit right

    The right operand.

    Returns
    Type Description
    bool

    true if left has fewer or the same number of bytes as right; otherwise, false.

    operator *(DataUnit, double)

    Multiplies a DataUnit by a double-precision floating-point scalar, scaling the stored byte count proportionally.

    Declaration
    public static DataUnit operator *(DataUnit left, double right)
    Parameters
    Type Name Description
    DataUnit left

    The DataUnit operand.

    double right

    The scalar multiplier.

    Returns
    Type Description
    DataUnit

    A new DataUnit whose byte count equals left.Byte * right.

    operator *(DataUnit, int)

    Multiplies a DataUnit by an integer scalar, scaling the stored byte count by an exact whole-number factor.

    Declaration
    public static DataUnit operator *(DataUnit left, int right)
    Parameters
    Type Name Description
    DataUnit left

    The DataUnit operand.

    int right

    The integer scalar multiplier.

    Returns
    Type Description
    DataUnit

    A new DataUnit whose byte count equals left.Byte * right.

    operator *(double, DataUnit)

    Multiplies a double-precision floating-point scalar by a DataUnit, scaling the stored byte count proportionally. This overload allows scalar-first syntax such as 2.5 * someDataUnit.

    Declaration
    public static DataUnit operator *(double left, DataUnit right)
    Parameters
    Type Name Description
    double left

    The scalar multiplier.

    DataUnit right

    The DataUnit operand.

    Returns
    Type Description
    DataUnit

    A new DataUnit whose byte count equals left * right.Byte.

    operator *(int, DataUnit)

    Multiplies an integer scalar by a DataUnit, scaling the stored byte count by an exact whole-number factor. This overload allows integer-first syntax such as 4 * someDataUnit.

    Declaration
    public static DataUnit operator *(int left, DataUnit right)
    Parameters
    Type Name Description
    int left

    The integer scalar multiplier.

    DataUnit right

    The DataUnit operand.

    Returns
    Type Description
    DataUnit

    A new DataUnit whose byte count equals left * right.Byte.

    operator -(DataUnit, DataUnit)

    Subtracts one DataUnit instance from another. Because DataUnit values are always non-negative, the result is validated and an exception is thrown if the subtraction would produce a negative size.

    Declaration
    public static DataUnit operator -(DataUnit left, DataUnit right)
    Parameters
    Type Name Description
    DataUnit left

    The minuend (the value to subtract from).

    DataUnit right

    The subtrahend (the value to subtract).

    Returns
    Type Description
    DataUnit

    A new DataUnit whose byte count equals left.Byte - right.Byte.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if the result would be negative (i.e., right is larger than left).

    Implements

    IEquatable<T>
    In this article
    Back to top Scylla Framework - Core Module API Documentation