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

    Class ScyllaGridGraphAdapter<TCoord, TCell>

    Adapter that presents an IScyllaGrid<TCoord, TCell> as an IScyllaReadOnlyGraph, enabling standard graph algorithms to operate directly on grid data without building an explicit adjacency structure.

    Inheritance
    object
    ScyllaGridGraphAdapter<TCoord, TCell>
    Implements
    IScyllaReadOnlyGraph
    IScyllaGraph
    IScyllaCollection
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Scylla.Core.Structures
    Assembly: ScyllaCore.dll
    Syntax
    public sealed class ScyllaGridGraphAdapter<TCoord, TCell> : IScyllaReadOnlyGraph, IScyllaGraph, IScyllaCollection where TCoord : struct, IEquatable<TCoord>
    Type Parameters
    Name Description
    TCoord

    The coordinate type of the underlying grid. Must be a value type that implements IEquatable<T> so that coordinate comparisons in neighbor queries are allocation-free.

    TCell

    The type of data stored in each grid cell. Used only by the optional isWalkable predicate; graph topology methods do not inspect cell data directly.

    Remarks

    This is a lazy, on-demand adapter. No pre-computation of adjacency data is performed at construction time; neighbor relationships and edge weights are computed on the fly from the underlying grid each time a traversal query is issued. This means the adapter always reflects the current state of the grid, but repeated traversals over the same grid will recompute neighbors each time. For scenarios where the grid is static and traversal is performance-critical, consider converting the adapter to a ScyllaCSRGraph using CreateFromGraph(IScyllaReadOnlyGraph), which will freeze the graph topology into a cache-friendly CSR array.

    Node IDs are compact integers computed from grid coordinates via the coordToNodeID delegate. The specific formula depends on the grid type and is configured automatically by the static factory methods (FromSquareGrid(ScyllaSquareGrid<TCell>, Func<TCell, bool>, Func<SquareCoord, SquareCoord, float>, SquareAdjacency), FromHexGrid(ScyllaHexGrid<TCell>, Func<TCell, bool>, Func<HexCoord, HexCoord, float>), FromTriGrid(ScyllaTriGrid<TCell>, Func<TCell, bool>, Func<TriCoord, TriCoord, float>)). Custom coordinate-to-ID mappings can also be supplied via the public constructor.

    Walkability filtering is applied lazily: a cell and all of its neighbors are checked against the optional isWalkable predicate each time GetNeighborCount(int) or GetNeighborsNonAlloc(int, Span<ScyllaGraphEdge>) is called. Unwalkable cells contribute zero outgoing edges.

    Grid graphs are always undirected (the adapter does not set Directed). They are weighted only when a non-null costFunction is provided at construction time.

    EdgeCount returns -1 because the total number of walkable edges is not pre-computed. Callers should use CopyAllEdges(Span<ScyllaGraphEdge>) and inspect the return value if the actual edge count is needed.

    Clear() is not supported and always throws InvalidOperationException.

    Adapt a square grid and run Dijkstra on it:

    var grid = new ScyllaSquareGrid<bool>(10, 10, true);
    // Mark some cells as unwalkable.
    grid.TrySet(new SquareCoord(3, 3), false);
    var graph = ScyllaGridGraphAdapter<SquareCoord, bool>.FromSquareGrid(
        grid,
        isWalkable: cell => cell);
    var path = ScyllaGraphAlgorithms.Dijkstra(graph, 0, 99);

    Constructors

    ScyllaGridGraphAdapter(IScyllaGrid<TCoord, TCell>, Func<TCoord, int>, Func<int, TCoord>, Func<TCoord, TCoord[], int>, int, int, Func<TCell, bool>, Func<TCoord, TCoord, float>)

    Creates a new grid graph adapter with fully customizable coordinate mapping. For standard grid types, prefer the static factory methods (FromSquareGrid(ScyllaSquareGrid<TCell>, Func<TCell, bool>, Func<SquareCoord, SquareCoord, float>, SquareAdjacency), FromHexGrid(ScyllaHexGrid<TCell>, Func<TCell, bool>, Func<HexCoord, HexCoord, float>), FromTriGrid(ScyllaTriGrid<TCell>, Func<TCell, bool>, Func<TriCoord, TriCoord, float>)) which configure all delegates automatically.

    Declaration
    public ScyllaGridGraphAdapter(IScyllaGrid<TCoord, TCell> grid, Func<TCoord, int> coordToNodeID, Func<int, TCoord> nodeIDToCoord, Func<TCoord, TCoord[], int> getNeighborCoords, int maxNeighbors, int nodeCount, Func<TCell, bool> isWalkable = null, Func<TCoord, TCoord, float> costFunction = null)
    Parameters
    Type Name Description
    IScyllaGrid<TCoord, TCell> grid

    The grid to adapt. Must not be null. The adapter holds a reference to the grid; mutations to the grid after adapter creation are immediately reflected in all subsequent queries.

    Func<TCoord, int> coordToNodeID

    Function that converts a grid coordinate to a non-negative integer node ID. Must produce unique IDs in the range [0, nodeCount) and be the exact inverse of nodeIDToCoord. Must not be null.

    Func<int, TCoord> nodeIDToCoord

    Function that converts a node ID back to its grid coordinate. Must be the exact inverse of coordToNodeID. Must not be null.

    Func<TCoord, TCoord[], int> getNeighborCoords

    Function that fills the provided TCoord[] buffer (whose length equals maxNeighbors) with the neighbor coordinates of the given coordinate and returns the number of neighbors written. The function must not write more entries than maxNeighbors. Must not be null.

    int maxNeighbors

    Maximum number of neighbors a single node can have. Used to size the internal reusable scratch buffer. For square grids: 4 (VonNeumann) or 8 (Moore). For hex grids: 6. For triangle grids: 3.

    int nodeCount

    Total number of nodes (grid cells) represented by this adapter.

    Func<TCell, bool> isWalkable

    Optional predicate applied to cell data to determine walkability. When null, all cells within the grid bounds are treated as walkable.

    Func<TCoord, TCoord, float> costFunction

    Optional function that returns the traversal cost (edge weight) between two adjacent coordinates. When null, all edges have weight 1.0f and Weighted will not be set on Properties.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when grid, coordToNodeID, nodeIDToCoord, or getNeighborCoords is null.

    Properties

    Capabilities

    Gets the capability flags for this collection. Reports SupportsContains only. SupportsCopyTo is not reported because edge count is dynamic and not pre-computed.

    Declaration
    public ScyllaCollectionCapabilities Capabilities { get; }
    Property Value
    Type Description
    ScyllaCollectionCapabilities

    Count

    Gets the number of items in the collection, which equals NodeCount. Satisfies the Count contract where nodes are treated as the primary collection element.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int

    EdgeCount

    Gets the number of edges in the graph. Always returns -1 because the adapter does not pre-compute the total number of walkable edges. Use CopyAllEdges(Span<ScyllaGraphEdge>) and inspect its return value if the actual count is needed.

    Declaration
    public int EdgeCount { get; }
    Property Value
    Type Description
    int

    IsEmpty

    Gets a value indicating whether the graph contains no nodes. Returns true when NodeCount is zero (i.e., the grid has zero area).

    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type Description
    bool

    NodeCount

    Gets the total number of nodes in the adapted graph. For a dense grid of width W and height H, this equals W * H for square and hex grids, or W * H * 2 for triangle grids (two triangle orientations per grid position).

    Declaration
    public int NodeCount { get; }
    Property Value
    Type Description
    int

    Properties

    Gets the structural property flags describing this graph. Grid graphs are always undirected, so Directed is never set. Weighted is set only when a non-null costFunction was provided at construction time.

    Declaration
    public ScyllaGraphProperties Properties { get; }
    Property Value
    Type Description
    ScyllaGraphProperties

    SyncRoot

    Gets the synchronization root for this collection. Always returns null because this adapter provides no synchronization mechanism.

    Declaration
    public object SyncRoot { get; }
    Property Value
    Type Description
    object

    ThreadSafety

    Gets the thread-safety classification for this graph. Reported as Unsynchronized. The adapter is not thread-safe because Scylla.Core.Structures.ScyllaGridGraphAdapter<TCoord, TCell>._neighborBuffer is a shared mutable scratch buffer reused across all neighbor queries.

    Declaration
    public ScyllaCollectionThreadSafety ThreadSafety { get; }
    Property Value
    Type Description
    ScyllaCollectionThreadSafety

    Methods

    Clear()

    Not supported. ScyllaGridGraphAdapter<TCoord, TCell> is a read-only view over a grid and cannot be cleared.

    Declaration
    public void Clear()
    Exceptions
    Type Condition
    InvalidOperationException

    Always thrown. To modify grid contents, operate directly on the underlying IScyllaGrid<TCoord, TCell>.

    ContainsEdge(int, int)

    Determines whether a walkable edge connects two adjacent nodes.

    Declaration
    public bool ContainsEdge(int fromID, int toID)
    Parameters
    Type Name Description
    int fromID

    ID of the source node.

    int toID

    ID of the target node.

    Returns
    Type Description
    bool

    true if a walkable connection exists between the two nodes; false if either node is out of bounds, either cell is unwalkable, or they are not adjacent.

    Remarks

    An edge exists between fromID and toID if and only if all of the following conditions hold:

    1. Both node IDs resolve to valid grid coordinates.
    2. If a walkability predicate was provided, both cells pass it (an edge to or from an unwalkable cell does not exist).
    3. The target coordinate is reported as a neighbor of the source coordinate by the getNeighborCoords delegate.

    ContainsNode(int)

    Determines whether a node with the specified ID corresponds to a valid coordinate within the bounds of the underlying grid.

    Declaration
    public bool ContainsNode(int nodeID)
    Parameters
    Type Name Description
    int nodeID

    The integer node ID to check. Must be in range [0, NodeCount).

    Returns
    Type Description
    bool

    true if nodeID is non-negative, less than NodeCount, and its corresponding grid coordinate is within the grid bounds; false otherwise.

    Remarks

    The check is performed by converting nodeID back to a grid coordinate via _nodeIDToCoord and then calling Contains(TCoord). Node IDs outside the valid range [0, NodeCount) immediately return false without invoking the coordinate conversion delegate.

    CoordToNode(TCoord)

    Converts a grid coordinate to its node ID. Use this to obtain the source and target IDs to pass to a graph search.

    Declaration
    public int CoordToNode(TCoord coord)
    Parameters
    Type Name Description
    TCoord coord

    The grid coordinate to convert.

    Returns
    Type Description
    int

    The node ID corresponding to coord.

    CopyAllEdges(Span<ScyllaGraphEdge>)

    Copies all walkable edge descriptors from the graph into the provided span. Edges are generated on the fly by iterating all nodes and calling GetNeighborsNonAlloc(int, Span<ScyllaGraphEdge>) on each. Because the graph is undirected, only the canonical direction (FromID < ToID) is copied so that each logical edge appears exactly once in the output. Copying stops when destination is full.

    Declaration
    public int CopyAllEdges(Span<ScyllaGraphEdge> destination)
    Parameters
    Type Name Description
    Span<ScyllaGraphEdge> destination

    Span into which the ScyllaGraphEdge descriptors will be written.

    Returns
    Type Description
    int

    The number of edges written into destination.

    Remarks

    This operation is O(N * maxNeighbors) where N is NodeCount, because neighbor coordinates must be computed for every node. For static grids where bulk edge enumeration is frequent, prefer converting the adapter to a ScyllaCSRGraph via CreateFromGraph(IScyllaReadOnlyGraph).

    CopyAllNodes(Span<ScyllaGraphNode>)

    Copies all node descriptors (one per grid position) into the provided span. Nodes are written in ascending node ID order (i.e., row-major order for most grid types). For each node, the ScyllaGraphNodeFlags are computed via TryGetNodeFlags(int, out ScyllaGraphNodeFlags). If destination is smaller than NodeCount, only as many nodes as fit are copied.

    Declaration
    public int CopyAllNodes(Span<ScyllaGraphNode> destination)
    Parameters
    Type Name Description
    Span<ScyllaGraphNode> destination

    Span into which the ScyllaGraphNode descriptors will be written.

    Returns
    Type Description
    int

    The number of nodes written into destination.

    FromHexGrid(ScyllaHexGrid<TCell>, Func<TCell, bool>, Func<HexCoord, HexCoord, float>)

    Creates a ScyllaGridGraphAdapter<TCoord, TCell> that wraps a ScyllaHexGrid<TCell> using the offset-normalized node ID formula nodeID = (r - rMin) * width + (q - qMin), where qMin and rMin are the minimum axial coordinate values of the grid's bounding rectangle.

    Declaration
    public static ScyllaGridGraphAdapter<HexCoord, TCell> FromHexGrid(ScyllaHexGrid<TCell> grid, Func<TCell, bool> isWalkable = null, Func<HexCoord, HexCoord, float> costFunction = null)
    Parameters
    Type Name Description
    ScyllaHexGrid<TCell> grid

    The hex grid to adapt. Must not be null.

    Func<TCell, bool> isWalkable

    Optional predicate applied to cell data to determine walkability. When null, all cells within the grid bounds are treated as walkable.

    Func<HexCoord, HexCoord, float> costFunction

    Optional function that returns the traversal cost between two adjacent HexCoord coordinates. When null, all edge weights are 1.0f.

    Returns
    Type Description
    ScyllaGridGraphAdapter<HexCoord, TCell>

    A new ScyllaGridGraphAdapter<TCoord, TCell> parameterized as ScyllaGridGraphAdapter<HexCoord, TCell>.

    Remarks

    Hex grids use axial (q, r) coordinates. The node ID formula normalizes these to zero-based indices so that node IDs are compact integers in the range [0, NodeCount). The inverse mapping is: q = nodeID % width + qMin, r = nodeID / width + rMin.

    Each hex cell has up to 6 neighbors, so the internal scratch buffer is sized to 6.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when grid is null.

    FromSparseHexGrid(ScyllaSparseHexGrid<TCell>, Func<TCell, bool>, Func<HexCoord, HexCoord, float>)

    Creates a ScyllaGridGraphAdapter<TCoord, TCell> that wraps a bounded ScyllaSparseHexGrid<TCell> using the same offset-normalized node ID formula as FromHexGrid(ScyllaHexGrid<TCell>, Func<TCell, bool>, Func<HexCoord, HexCoord, float>): nodeID = (r - rMin) * width + (q - qMin).

    Declaration
    public static ScyllaGridGraphAdapter<HexCoord, TCell> FromSparseHexGrid(ScyllaSparseHexGrid<TCell> grid, Func<TCell, bool> isWalkable = null, Func<HexCoord, HexCoord, float> costFunction = null)
    Parameters
    Type Name Description
    ScyllaSparseHexGrid<TCell> grid

    The bounded sparse hex grid to adapt. Must not be null.

    Func<TCell, bool> isWalkable

    Optional predicate applied to cell data to determine walkability.

    Func<HexCoord, HexCoord, float> costFunction

    Optional per-edge traversal cost between adjacent hexes; 1.0f when null.

    Returns
    Type Description
    ScyllaGridGraphAdapter<HexCoord, TCell>

    A new ScyllaGridGraphAdapter<HexCoord, TCell> over the sparse grid.

    Remarks

    Only cells that have actually been set in the sparse grid are graph nodes (the adapter's node-existence check uses Contains(TCoord), which for a sparse grid means "has a value"). Set the cells that make up walkable terrain; unset cells act as walls. The isWalkable predicate filters set cells further.

    The grid must be bounded so node IDs form a compact range; an unbounded sparse grid throws.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when grid is null.

    ArgumentException

    Thrown when grid is unbounded.

    FromSquareGrid(ScyllaSquareGrid<TCell>, Func<TCell, bool>, Func<SquareCoord, SquareCoord, float>, SquareAdjacency)

    Creates a ScyllaGridGraphAdapter<TCoord, TCell> that wraps a ScyllaSquareGrid<TCell> using the row-major node ID formula nodeID = row * width + col.

    Declaration
    public static ScyllaGridGraphAdapter<SquareCoord, TCell> FromSquareGrid(ScyllaSquareGrid<TCell> grid, Func<TCell, bool> isWalkable = null, Func<SquareCoord, SquareCoord, float> costFunction = null, SquareAdjacency adjacency = SquareAdjacency.VonNeumann)
    Parameters
    Type Name Description
    ScyllaSquareGrid<TCell> grid

    The square grid to adapt. Must not be null.

    Func<TCell, bool> isWalkable

    Optional predicate applied to cell data to determine walkability. When null, all cells within the grid bounds are treated as walkable.

    Func<SquareCoord, SquareCoord, float> costFunction

    Optional function that returns the traversal cost between two adjacent SquareCoord coordinates. When null, all edge weights are 1.0f.

    SquareAdjacency adjacency

    Adjacency mode for neighbor generation. Defaults to VonNeumann (4-connected).

    Returns
    Type Description
    ScyllaGridGraphAdapter<SquareCoord, TCell>

    A new ScyllaGridGraphAdapter<TCoord, TCell> parameterized as ScyllaGridGraphAdapter<SquareCoord, TCell>.

    Remarks

    The inverse mapping is col = nodeID % width, row = nodeID / width.

    The adjacency mode controls the maximum neighbor count per node:

    • VonNeumann (default) - 4-connected (N, S, E, W); max 4 neighbors.
    • Moore - 8-connected (N, S, E, W plus all diagonals); max 8 neighbors.
    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when grid is null.

    FromTriGrid(ScyllaTriGrid<TCell>, Func<TCell, bool>, Func<TriCoord, TriCoord, float>)

    Creates a ScyllaGridGraphAdapter<TCoord, TCell> that wraps a ScyllaTriGrid<TCell> using the orientation-encoded node ID formula nodeID = ((B - 1) * width + (A - 1)) * 2 + orientation, where orientation is 0 for downward triangles (A + B + C = 1) and 1 for upward triangles (A + B + C = 2).

    Declaration
    public static ScyllaGridGraphAdapter<TriCoord, TCell> FromTriGrid(ScyllaTriGrid<TCell> grid, Func<TCell, bool> isWalkable = null, Func<TriCoord, TriCoord, float> costFunction = null)
    Parameters
    Type Name Description
    ScyllaTriGrid<TCell> grid

    The triangle grid to adapt. Must not be null.

    Func<TCell, bool> isWalkable

    Optional predicate applied to cell data to determine walkability. When null, all cells within the grid bounds are treated as walkable.

    Func<TriCoord, TriCoord, float> costFunction

    Optional function that returns the traversal cost between two adjacent TriCoord coordinates. When null, all edge weights are 1.0f.

    Returns
    Type Description
    ScyllaGridGraphAdapter<TriCoord, TCell>

    A new ScyllaGridGraphAdapter<TCoord, TCell> parameterized as ScyllaGridGraphAdapter<TriCoord, TCell>.

    Remarks

    Triangle grids use three-axis lane coordinates (A, B, C). Each grid position contains two triangles - one pointing downward and one pointing upward - so the total node count is width * height * 2.

    The inverse node-ID-to-coordinate mapping is:

    • orientation = nodeID % 2
    • cellIndex = nodeID / 2
    • col = cellIndex % width, row = cellIndex / width
    • A = col + 1, B = row + 1
    • C = (orientation == 1) ? (2 - A - B) : (1 - A - B)

    Each triangle cell has up to 3 neighbors, so the internal scratch buffer is sized to 3.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when grid is null.

    GetNeighborCount(int)

    Returns the number of walkable neighbors reachable from the specified node.

    Declaration
    public int GetNeighborCount(int nodeID)
    Parameters
    Type Name Description
    int nodeID

    The ID of the node to query.

    Returns
    Type Description
    int

    The count of walkable neighbors, or -1 if nodeID is not a valid node in the graph. Returns 0 if the node exists but its cell is unwalkable.

    Remarks

    Neighbor coordinates are obtained by calling _getNeighborCoords into the shared Scylla.Core.Structures.ScyllaGridGraphAdapter<TCoord, TCell>._neighborBuffer. Each candidate neighbor is then filtered by grid bounds and, if a walkability predicate is configured, by cell walkability. The source cell itself is also checked for walkability; if it is unwalkable, 0 is returned immediately.

    GetNeighborsNonAlloc(int, Span<ScyllaGraphEdge>)

    Copies the walkable outgoing edges of the specified node into a caller-provided span, avoiding any heap allocation.

    Declaration
    public int GetNeighborsNonAlloc(int nodeID, Span<ScyllaGraphEdge> destination)
    Parameters
    Type Name Description
    int nodeID

    The ID of the node whose outgoing edges should be retrieved.

    Span<ScyllaGraphEdge> destination

    Span into which the ScyllaGraphEdge descriptors will be written. Must be allocated by the caller; no allocation is performed by this method.

    Returns
    Type Description
    int

    The number of edges written into destination, or -1 if nodeID is not a valid node. Returns 0 if the node's cell is unwalkable.

    Remarks

    For each valid, walkable neighbor, an edge descriptor is written to destination with:

    • FromID set to nodeID.
    • ToID set to the neighbor's node ID.
    • Weight set to the result of the costFunction delegate, or 1.0f if no cost function was provided.

    If destination fills before all neighbors are processed, copying stops and the number of edges written so far is returned. Use GetNeighborCount(int) to pre-size the buffer if all edges are needed.

    NodeToCoord(int)

    Converts a node ID back to its grid coordinate. Use this to translate the node IDs in a ScyllaGraphPath (returned by Dijkstra or A*) into grid coordinates.

    Declaration
    public TCoord NodeToCoord(int nodeID)
    Parameters
    Type Name Description
    int nodeID

    The node ID to convert.

    Returns
    Type Description
    TCoord

    The grid coordinate corresponding to nodeID.

    TryGetEdge(int, int, out ScyllaGraphEdge)

    Attempts to retrieve the edge descriptor for a walkable connection between two nodes. The edge weight is computed on demand using the configured cost function, or defaults to 1.0f if no cost function was provided.

    Declaration
    public bool TryGetEdge(int fromID, int toID, out ScyllaGraphEdge edge)
    Parameters
    Type Name Description
    int fromID

    ID of the source node.

    int toID

    ID of the target node.

    ScyllaGraphEdge edge

    When this method returns true, contains the ScyllaGraphEdge descriptor for the connection. When this method returns false, contains the default value of ScyllaGraphEdge.

    Returns
    Type Description
    bool

    true if a walkable edge from fromID to toID exists; false if either node is out of bounds, either cell is unwalkable, or the nodes are not adjacent.

    TryGetNodeFlags(int, out ScyllaGraphNodeFlags)

    Attempts to retrieve the ScyllaGraphNodeFlags for the specified node. Walkability is determined dynamically from the cell data via the configured isWalkable predicate. If no predicate was provided, all valid cells are reported as Walkable.

    Declaration
    public bool TryGetNodeFlags(int nodeID, out ScyllaGraphNodeFlags flags)
    Parameters
    Type Name Description
    int nodeID

    The ID of the node to query.

    ScyllaGraphNodeFlags flags

    When this method returns true, contains either Walkable or None depending on the walkability predicate result for this cell. When this method returns false, contains the default value of ScyllaGraphNodeFlags.

    Returns
    Type Description
    bool

    true if nodeID corresponds to a valid grid coordinate; false otherwise.

    Implements

    IScyllaReadOnlyGraph
    IScyllaGraph
    IScyllaCollection

    Extension Methods

    FileExtensions.SaveSecureToFileAsync<T>(T, string, string, CancellationToken)
    FileExtensions.SaveSecureToFile<T>(T, string, string)
    FileExtensions.SaveToFileAsync<T>(T, string, CancellationToken)
    FileExtensions.SaveToFile<T>(T, string)
    FileExtensions.SaveToFile<T>(T, string, SerializationSettings)

    See Also

    ScyllaCSRGraph
    IScyllaReadOnlyGraph
    ScyllaGraphAlgorithms
    In this article
    Back to top Scylla Framework - Core Module API Documentation