Namespace Scylla.Core.Util
Classes
ArrayUtil
Provides utility methods for working with arrays, including dynamic resizing, capacity management, searching, sorting, and element manipulation.
AssemblyUtil
Provides utilities for detecting and reacting to Unity Editor assembly reload events. Tracks whether an assembly reload is currently in progress and exposes events that systems can subscribe to in order to save and restore transient state across domain reloads.
CameraUtil
Provides camera-related utility methods including FOV conversion, visibility queries, frustum calculations, allocation-free viewport helpers, depth linearization, render pipeline detection, factory methods for common camera archetypes, and pipeline-agnostic camera configuration (URP/HDRP/Built-in).
CollectionUtil
Provides extension methods for List<T> and IList<T> covering element access, removal, reordering, filling, resizing, and index-based sorting that does not disturb the original list.
ColorUtil
Provides comprehensive utility methods and extension methods for working with Unity's UnityEngine.Color and UnityEngine.Color32 types, including hex string parsing and formatting, HSV decomposition and manipulation, per-channel copy-and-modify helpers, RGB multiplication, color transformations (invert, grayscale, luminance), HSV-space interpolation, and procedural random color generation.
ComponentUtil
Provides utility methods for caching and managing Unity components, with a unified set of extension methods on both UnityEngine.GameObject and UnityEngine.Component.
DateUtil
Provides a comprehensive set of static utility methods for working with DateTime values, including culture-aware formatting and parsing, date arithmetic, boundary calculations (start/end of day, week, month, year), calendar queries, human-readable relative descriptions, Unix timestamp conversions, and age calculations.
DebugCamera
A drop-in free-fly debug camera. Add it to any UnityEngine.Camera (or use the
Scylla/Tools/Add Debug Camera to Scene menu) to navigate a scene in Play mode with configurable
keyboard and mouse controls, framerate-independent smoothing, and an optional orbit mode
that circles a target. It is a self-contained Core utility with no dependency on the
Scylla Camera module or the Scylla Input module.
FontUtil
Centralized font loading and management utility for the Scylla framework.
Provides a single source of truth for font access, supporting both Unity's built-in
UnityEngine.Font (TTF) and TextMesh Pro's TMPro.TMP_FontAsset (SDF)
formats. Uses lazy per-name dictionaries to cache loaded assets so that repeated
calls to any Load* method never trigger a redundant Load<T>(string)
call.
GameObjectExtensions
Provides fluent extension methods on UnityEngine.GameObject that delegate directly to the static utility methods in GameObjectUtil.
GameObjectUtil
Provides commonly used utility methods for working with Unity UnityEngine.GameObject hierarchies, covering object creation and ensuring, component management, hierarchy queries, world-space bounds aggregation, visibility and collider toggling, recursive layer assignment, and editor-safe destruction.
InterfaceUtil
Provides methods for discovering and retrieving Unity UnityEngine.MonoBehaviour components by interface type. Supports scene-wide searches, single-object searches, and type-discovery queries backed by a thread-safe reflection cache, so that the assembly scan is only performed once per interface type per session.
Interpolation
Provides mathematical interpolation and easing functions for smooth animations, transitions, and motion. Includes spline interpolation (Cubic, Catmull-Rom), easing functions (smooth step variants), S-curve lerp overloads for float, UnityEngine.Vector2, and UnityEngine.Vector3, and frame-independent movement utilities.
LightUtil
Provides factory methods for creating Unity UnityEngine.Light GameObjects (directional, point, and spot) and a pipeline-agnostic API for configuring shadow resolution via ScyllaShadowResolution. All creation methods accept optional parameters so callers need only specify the values that differ from sensible defaults.
ManualResetEventEx
A disposable wrapper around ManualResetEventSlim for cross-thread signaling. One or more threads can Wait() on this event; a single call to Set() releases all of them simultaneously. The event can be reused by calling Reset() to return it to the non-signaled state.
MaterialUtil
Creates and configures physically-based Lit UnityEngine.Material instances at runtime,
mapping pipeline-neutral surface parameters (base color, metallic, smoothness, emission,
PBR texture channels, surface blend mode, and double-sided rendering) onto whichever Lit
shader the active render pipeline provides: Universal Render Pipeline/Lit (URP),
HDRP/Lit (HDRP), or the Built-in Standard shader.
NumberExtensions
Provides extension methods for numeric types that expose the static methods of NumberUtil
in a fluent, instance-method style. This allows chained usage on literals and local variables without
requiring the full NumberUtil.Method(value, ...) call syntax.
NumberUtil
Provides a comprehensive set of deterministic numeric utility methods covering clamping, range checks, floating-point comparisons, rounding, interpolation, modular arithmetic, safe division, power-of-two alignment, angle operations, and common math helpers across all standard numeric types.
OptionalPackages
Runtime detection of optional Unity packages that Scylla integrates with but does not hard-require. Lets callers fail fast with a clear, actionable message when a precompiled Scylla assembly was built against an optional package (such as Addressables or SharpZipLib) that is absent from the consuming project.
PlatformUtil
Provides platform detection, build configuration queries, and device capability information for the current runtime environment.
ResourceUtil
Provides utility methods for working with Unity's synchronous and asynchronous
Resources API. Wraps common resource operations with warning logging,
null-safety, typed instantiation helpers, and async/awaitable overloads.
SpriteUtil
Provides utility methods for procedurally generating sprites and textures at runtime, as well as safe cleanup helpers for both play-mode and edit-mode contexts.
StringUtil
Provides a comprehensive set of string utility methods and extension methods for common string operations used throughout Scylla, including stable hashing, sanitization, JSON escaping, null/whitespace guards, ordinal comparison helpers, safe slicing, line-ending normalization, invariant-culture formatting and parsing, truncation, padding, and Unity Rich Text tag generation.
TabularText
Represents formatted tabular text output with configurable columns, alignment, headers, footers, and sorting. Optimized for efficient string building using StringBuilder with no modifications to internal state during rendering.
TabularText.Builder
Fluent builder for constructing TabularText instances with complex configuration. All settings are optional and default to sensible values.
TestTextGenerator
Provides static methods for generating placeholder text including Lorem Ipsum paragraphs, random sentences, pangrams, and mixed text lines. Intended for use during UI prototyping, layout testing, font previews, and development scaffolding where realistic-looking but semantically meaningless text is needed.
ThreadUtil
Provides static cross-thread synchronization utilities for Unity 6.5+ (.NET 8). Covers volatile reads and writes, memory barriers, cooperative thread yielding, atomic interlocked operations, and safe dispatch of work back to the Unity main thread.
TimeUtil
Provides static utility methods and cached properties for time-related operations in Unity, including per-frame delta time caching, frame-rate-normalized deltas, rolling FPS statistics, time formatting, interpolation helpers, and game-speed control.
Timer
A general-purpose timer that tracks elapsed time and invokes callbacks on completion. Supports pausing, resuming, looping, time scaling, and provides progress information. All control methods return the timer instance for fluent method chaining.
TransformExtensions
Provides extension methods for Unity's UnityEngine.Transform class, covering alternative coordinate system conversions (cylindrical, spherical, and polar), convenience reset and copy helpers, single-axis position setters, child management, deep hierarchy search, UnityEngine.RectTransform setup, and physics-component discovery.
TypeUtil
Provides static reflection utilities for type discovery, attribute retrieval, and type-relationship testing. All expensive reflection results are cached internally to make repeated lookups efficient. A single shared lock protects all caches, making every method thread-safe.
VirtualTransform
Represents a detached transform that enables transform operations without being attached
to a GameObject. Unlike Unity's Transform component, VirtualTransform allows
calculations and manipulations without affecting the world state or requiring a scene
hierarchy.
Structs
LitMaterialDescriptor
Describes the surface of a physically-based Lit material in pipeline-neutral terms:
base color, metallic, smoothness, emission, the PBR texture channels, the surface
blend mode, and whether the material renders double-sided. Passed to
CreateLitMaterial(in LitMaterialDescriptor) to build a
material whose properties are mapped to the active render pipeline's Lit shader (URP,
HDRP, or the Built-in Standard shader).
UnicodeRange
Represents a contiguous, inclusive range of Unicode codepoints with an optional human-readable name. Used to specify which character subsets to scan when extracting the set of supported glyphs from a font asset.
Enums
FontVariant
Font weight variants for the Scylla monospace font families. The bundled fonts ship in
three weights only and provide no italic assets; slanted text is produced at runtime via
TextMesh Pro's FontStyles.Italic.