25 September 2024
Hotfix for pointer truncation in Unsafe.Align[...](void*)
on Android
Hotfix for Mono build crashes when using TinyIL
- Added
STuple
readonly struct as replacement forSystem.Tuple
- Added
Equals
,GetHashCode
, andCompare
shortcuts toCompareUtils
- Made word size detection in
Unsafe
more robust - Fixed pointer truncation in
Unsafe.Align[...](void*)
on Android - Builds targeting Mono will no longer crash upon calling internal call shortcuts when compiled with TinyIL
30 August 2024
Hotfix for MapUtils.EnsureCapacity
and SetUtils.EnsureCapacity
in Unity 2019
Variant
can now store an instance id as a reference to a unity object- Note that if BeauData is included, this value type cannot be serialized
MapUtils.EnsureCapacity
andSetUtils.EnsureCapacity
now work in Unity 2019 for collections constructed without an initial capacity
29 August 2024
Hotfix for Enums.IsZero
and Enums.IsNotZero
, Unity 2019 compatibility
UniqueIdAllocator
,UniqueIdMap
andLLTable
can now be set to a fixed capacity (non-flexible)UnityHelper.Find
and similar use the newResources.InstanceIdToObject
and similar APILruCache
eviction now uses a linked list instead of an access counter for O(1) perf instead of O(N)- Implemented
Unsafe.NullRef
,Unsafe.IsNullRef
,Unsafe.AsPointer
, andUnsafe.AsTypedPointer
as alternatives to unavailable .NETUnsafe
api
Enums.IsZero
andEnums.IsNotZero
no longer emit improper IL when using TinyILSceneReference
constructor made compatible with Unity 2019 editor again
25 July 2024
Hotfix for CameraHelper
global camera ordering
25 July 2024
Hotfix for BitSet256
bitwise operators
- Default
TypeIndex
capacity lowered from 512 to 128 QueryParams
always preserves parameter string value, even if it can be parsed to aVariant
- Added optional ordering parameter to
CameraHelper
callback registration - Improved performance of
ToEnum(long)
andToEnum(ulong
- Added
MinWidth
property to allDMElementInfo
types - Added generic comparison and bitwise operators to
Enums
utility - Added
Unsafe.FastCast
to unchecked cast class types - Made
BitSet32
andBitSet64
serializable via proxy when BeauData package is present - Condensed default debug console layout
BitSet256
bitwise operators corrected
7 June 2024
New SceneReference
constructors, Performance improvements
- Added
SceneReference(string path)
andSceneReference(int buildIndex)
constructors SerializedAttributeSet
now reusesAttributeBinding<TAttr, MemberInfo>
instead of its own identical type- Added support for registering function pointers to
CastableArgument
- Made
CastableArgument.Cast
cost more consistent
5 June 2024
Hotfix for TinyIL integration build process revisions
21 May 2024
Hotfix for Grid2D.IsValid
failing on x == 0
or y == 0
- Added
UnsafeBitSet
, anIBitSet
backed by unsafe memory
- Added
Log.Trace
andLog.Debug
for bypassing Unity's console log - Added
DMInfo.SortByLabel
for sorting menu elements alphabetically - Added
DMInfo.FindSubmenu
andDMInfo.FindOrCreateSubmenu
for locating submenus - Added
DMInfo.MergeSubmenu
for merging submenus into a parent menu. - Reduced branching in
Bits.Set
(eliminated entirely withTinyIL
package) - Adjusted
PerformanceTracker.TryGetMemoryUsage
output when profiler is active
- Fixed
Grid2D.IsValid
not consideringx == 0
ory == 0
valid coordinates
21 March 2024
Hotfix for MeshData.Upload
not uploading modified vertex counts when reusing a MeshDataTarget
20 March 2024
Fixed out-of-bounds memory access in Unsafe.Hash64
Fixed incorrect bounds checking for MeshData.Vertex
ref accessors
- Added
NonIndexedAttribute
for marking types as non-traversable withTypeIndex
- Added
UnmanagedMeshData16
for reusable mesh data backed by unmanaged memory MeshData.Upload
now takes in an optional set of flags for reducing the amount of data uploaded
- Added implicit conversions from
StringSlice
toReadOnlySpan<char>
andReadOnlyMemory<char>
MeshData.Upload
tries to avoid uploading unchanged data to meshes by default- Improved performance of
Unsafe.Hash32
andUnsafeHash64
- Added
Ref.Replace
overloads for primitives - Added
DownloadHandlerUnsafeBuffer.Data
for retrieving anUnsafeSpan<byte>
- Added
CanvasHelper.GetSelectionState(Selectable)
for retrieving selection state of aSelectable
- Added
Geom.MinRect
for calculating the minimum bounding rectangle for a set of points
- Fixed out-of-bounds memory access in
Unsafe.Hash64
- Restored Unity 2019 compatibility
- Fixed
AssetDatabase.SaveAssets cannot be called during import
error in CustomTextAsset importer - Fixed
MeshData.Vertex
bounds checking against index count rather than vertex count
21 Feb 2024
Fixed exception in AssetDBUtils.Find
methods when encountering assets with missing types
Added BEAUUTIL_USE_LEGACY_UNITYEVENTS
define for reverting PointerListener
, TriggerListener[2D]
, and CollisionListener[2D]
events to serializable UnityEvents
9 Feb 2024
Performance improvements
Pointer alignment fixes
TypeIndex
can retrieve inheritance information
Disabling experimental MethodInvocationHelper pointer specialization
- Added
UnsafeEnumerator
for iterating over unsafe memory - Added IntrinsicIL definitions for several operations
- Requires
TinyIL.Mono
package
- Requires
- Added
BitEnumerator32
,BitEnumerator64
,EnumMaskEnumerator
andEnumBitEnumerator
structs for enumerating over set bits/mask values - Added
TypeIndex.GetAll
for retrieving indices up an inheritance chain
- Added conversion from
UnsafeSpan
toSpan
andReadOnlySpan
- Added conversion between
UnsafeSpan<T>
andUnsafeSpan<U>
- Added
Unsafe.IsAligned
methods for checking value/pointer alignment - Added pointer alignment checks to critical aligned operations
- Switch pointer-to-integral conversions to 32-bit on 32-bit machines
- Added
CastableAction
andCastableEvent
variants for 2, 3, and 4 parameters - Added
RingBuffer.Quicksort
shortcut for unmanaged element types - Added
Profiling.AvgTime
for averaging the duration for a set number of samples - Exposed
Unsafe.AllocAligned(Arena)
- Added
MeshData.Vertex
andMeshData.Index
calls for modifying vertex and index values directly - Added
Geom.SetTranslation
for setting matrix translation - Added
Geom.Forward/Up/Right
shortcuts for faster quaternion-to-vector calculations
- Disabled MethodInvocationHelper pointer specialization optimizations
ConsolePerformance
no longer starts the profiler automaticallyProfiling.Time
is more accurate and can be run on non-main threadsRingBuffer.Compress
no longer allocates memory in the case of split segmentsAssetDBUtils.Find
calls now return the most accurate result, not just the first one- Fixed accidental recursion in
StringUtils.ToUpperInvariant
- Fixed missed cases of using
Comparer<T>.Default
instead ofCompareUtils.DefaultSort<T>()
RingBuffer.Compress
renamed toRingBuffer.Linearize
for consistency- Events no longer exposed to inspector for the following components:
CollisionListener
/CollisionListener2D
TriggerListener
/TriggerListener2D
PointerListener
RectTransformPinned
1 Dec 2023
Hotfix for MethodInvocationHelper on IL2CPP platforms
- Added rect-aware clamping mode to
RectTransformPinned
- Added experimental
TRS.TryCreateFromMatrix
- Fixed specialized method invocation from
MethodInvocationHelper
on IL2CPP platforms - Fixed potential overflow issue when calling
Bits.IndexOf(Enum)
with a 64-bit enum - Fixed erroneous inclusion of context argument in
CastableEvent
andActionEvent
unsafe delegate registration methods
27 Nov 2023
Hotfix for out-of-range execution order values.
27 Nov 2023
Hotfix for AttributeCache.Get
Reflect.FindAllAssemblies
can now cache all loaded assemblies on IL2CPP builds
AttributeCache.Get
now works correctly for non-MemberInfo inputsSerializedAttributeSet.Read
correctly skips over assemblies it could not find- Fixed
Persist
default execution order
SerializedAttributeSet.Read
now requires a list of assemblies as input
16 Nov 2023
Hotfix for StringHashing
compilation error in non-debug builds
- Added
RegularPolyGraphic
for rendering regular polygons - Support for function pointers in 2021.2+ in function wrappers and
MethodInvocationHelper
Unsafe.Hash
functions now use Murmur2 instead of FNV-1a- Added various
Reserve
extension methods forDictionary
,List
,HashSet
, andStringBuilder
- Added tick rate conversion methods to
Profiling
- Added extension method polyfills for several
Dictionary
andHashSet
methods present in .NET standard but not earlier versions - Added
CameraHelper.GetStateHash
andTransformHelper.GetStateHash
for quickly checking camera and transform changes
- Fixed
StringHashing.DumpReverseLookupStats
compilation error in non-debug builds - Fixed
Unsafe.PinString(StringBuilder)
to properly catch instances of chained StringBuilders
14 Nov 2023
- Added
UnityHelper.IsPersistent
for checking if an asset is a persistent asset - Added
SceneHelper.GetLoadingState
andSceneHelper.GetGUID
for returning info about scenes - Added
SerializedAttributeSet
class for serializing reflection information - Added
ReloadableRef<T>
struct for references to assets with custom importers that may be reloaded during the editor - Added
AssetOnlyAttribute
property attribute for restricting an object reference to persistent objects only
- Added optional
Unity.Mathematics
integration for several bit calls - Inlined some
Reflect.Find
enumerable calls for better performance - Some
Reflect.Find
calls can now make use of the editor type cache in the editor - Added
StringHashing.DumpReverseLookupStats
for writing reverse lookup table stats to console - Added
StringHashReverseCacheInitialCapacityAttribute
attribute for setting the initial capacity of the reverse lookup table - Added
Unsafe.FormatBytes
for formatting byte counts
- Fixed several incompatibilities with Unity 2019
UnsafePtr.Ref
renamed toUnsafePtr.AsRef
1 Nov 2023
New time-bound execution utilities
Fix for SceneReference
serialization
New Unsafe
features
- Added
WorkSlider
utility for time-bound execution of work queues - Added
AttributeCache
classes for caching attribute information - Added
Unsafe.Clear
for clearing memory to defaults
- All versions of
OffsetLength
structs are now serializable - Added
OffsetLength.Contains
method to OffsetLength types for checking if value is within range - Improved
RingBuffer
andUnsafeSpan
debugger views - Added
BitSet.IsEmpty
method - Avoid adding multiple dividers in a row to
DMInfo
- Added a few more common vertex formats to
VertexUtility
file - Added
Unsafe.AllocSpan
variant ofUnsafe.AllocArray
to directly return anUnsafeSpan
- Added
AllocArray
andAllocSpan
methods toUnsafe.ArenaHandle
API - Added
Unsafe.AllocatorFlags.ZeroOnAllocate
for zeroing out allocated memory
- Fixed potential data format inconsistencies when using
SceneReference
in build
Unsafe.Reinterpret(TFrom*)
renamed in favor ofUnsafe.FastReinterpret(TFrom*)
to clarity reinterpretation method
13 Oct 2023
Hotfix for incorrect Unsafe.Read
behavior when arguments passed as ref
28 July 2023
Hotfix for UniqueIdAllocator
exception when exceeding initial capacity
DownloadHandlerUnsafeBuffer
can be passed allocation and free delegates instead of a pre-allocated buffer- New
AnimatorStateSnapshot
class for storing and restoring Animator layer and parameter information - All versions of
BitSet
are now serializable
UniqueIdAllocator
no longer throws an exception when reserving more identifier slots than initially allocated
- All variants of
Unsafe.Read/Write(string)
renamed toUnsafe.ReadUTF8/WriteUTF8
for consistency
29 June 2023
Hotfix for TypeIndex
custom capacity
29 June 2023
New collection types
MeshData
improvements
- New
BitSet
structs for easier access to bit sets - New
LruCache
fixed-size cache type - New
LLTable
collection, for array-backed linked lists - New
UniqueId
,UniqueIdAllocator
andUniqueIdMap
classes for generating unique validatable handles for array-backed storage CompareUtils.Default[...]
can now use types marked withDefaultEqualityComparer
andDefaultSorter
attributes for their respective types- New
Vectors
utility class for sequentially transforming vectors and vectors embedded in structs - New
OffsetLength
struct and utilities for representing ranges of data in 1-dimensional arrays/buffers - New
TypeIndex<T>
utility for statically mapping types to indices (for faster array lookups)
Bits
utilities now work on 64-bit integrals- Improved
MeshData.Upload
performance - Added
MeshData.Topology
, specified in constructor MeshData
can now transform ranges of verticesProfiling.Time
can now specify time units (milliseconds, microseconds, ticks)- Added callbacks to
DMInfo
for menu open and close CameraHelper
can now register global pre-cull, pre-render, and post-render handlersVertexUtility.GenerateLayout
also now returns size, attribute, and offset information
MeshData
correctly calculates maximum vertices based on index format and vertex size
RingBuffer<T>
is now a sealed classCompareUtils.DefaultComparer<T>
renamed toCompareUtils.DefaultEquals<T>
to avoid conceptual naming conflicts withCompareUtils.DefaultSort<T>
MeshData.Add[Shape]
returns anOffsetLength
instead of theMeshData
instance
19 June 2023
New Mesh
construction utilities
Support for Slider
control type in DMMenu
- New
MeshData16<Vertex>
class for interleaved mesh construction - Added
Slider
control support toDMMenu
- Added
Push
/Pop
methods to arena allocator for more fine-grained freeing of memory - Added
ArrayUtils.EnsureCapacity
to matchListUtils.EnsureCapacity
- Assert arguments are passed in using generics to avoid boxing
- Added Quantization methods to
MathUtils
- Added endian swap methods to
Unsafe
- Added
RingBuffer.MoveFrontToBack
and similar methods for moving elements between head and tail
- Fixed
RNG.Shuffle(RingBuffer)
call inference issue UnityHelper.SafeDestroy
can now correctly destroy runtime assets in editor- Important attributes like
BindContext
,BlockMeta
andBlockContent
now derive fromPreserveAttribute
14 March 2023
Hotfix for redundant ColorGroup
update registration and memory leak
Hotfix for RectTransformPinned
update order
6 March 2023
Hotfix for inverted RingBuffer.RemoveWhere
behavior
5 Feb 2023
Hotfix for CameraRenderScale rounding errors
19 Dec 2022
Hotfix for rare RingBuffer
crash
New layout event listener
Initialization optimizations
- Added
LayoutListener
component for callbacks when layout building starts/stops - Added
ActionEvent
for a parameter-less version ofCastableEvent
- Added
StringSlice
andStringBuilderSlice
versions ofTMP_Text.SetText
extensions
- Fixed rare
RingBuffer
crash when compressing a full buffer and then pushing
18 Nov 2022
Compilation error hotfix
TextureRegion
no longer supports tightly packed sprites
17 Nov 2022
- Added
RoundedRectGraphic
andEllipseGraphic
- Shape graphics (Rect, RoundedRect, Ellipse, GradientRect) can now use a per-canvas "white pixel" sprite to improve batching
- Added
UnityHelper.Find
,UnityHelper.IsAlive
, andUnityHelper.Id
for locating Unity objects by integer id. - Added
Unsafe.Hash32
andUnsafe.Hash64
to perform FNV-1a hash on arbitrary buffers (and unmanaged structs) - Added
NonBoxedValue
for returning an unknown type without boxing built-in numerics - Added
CameraHelper.AddOnPreCull
,CameraHelper.AddOnPreRender
, andCameraHelper.AddOnPostRender
(along with correspondingRemove
versions) for consistent camera callback mechanism between the default renderer and URP - Added
CastableEvent
for aCastableAction
-compatible alternative to C#'sevent
mechanism
CastableFunc
andCastableAction
now support function signatures with the first parameter passed by reference.StringUtils.ArgsList.Splitter
made immutable and thread-safe- Added
StringSlice.Unpack
to extract string and region data - Added
StringHash32.Fast
for a non-cached hash (does not record reverse-lookup information) MatchRuleSet.FindMatch
now uses non-cached hash for lookups- Added
Reflect.GetSignature
to return aMethodSignature
object - Added
Geom.Remap(Vector2, Rect, Rect)
andGeom.Remap(Vector3, Bounds, Bounds)
for remapping points between regions MethodCache
can now generate delegates for common method signatures instead of relying solely onMethodInfo.Invoke
- Added
RingBuffer.RemoveWhere
to remove elements passing a given predicate - Added
RingBuffer.Find
,RingBuffer.Exists
, andRingBuffer.FindIndex
for locating elements passing a given predicate
StringParser
numeric parsing no longer allocates memory due to use ofdecimal
- Scale calculations for
CameraFOVPlane
when inPixelHeight
mode now account for rounding errors
Unsafe.FastReinterpret(TFrom*)
removed in favor ofUnsafe.Reinterpret(TFrom*)
TextHelper
functions merged intoCanvasHelper
- Added
IStringConverter.TryConvertToVariant
for fast variant conversions IMethodCache.TryInvoke
now outputs aNonBoxedValue
instead ofobject
IStringConverter.TryConvertTo
now outputs aNonBoxedValue
instead ofobject
TiledRawImage
,ScrollTiledRawImage
,RectGraphic
, andGradientRectGraphic
are now under theBeauUtil.UI
namespace
11 Oct 2022
Hotfix for ConsolePerformance
stats formatting
Improved MatchRuleSet
performance and memory consumption
Fixed Unsafe.Reinterpret
for cases of casting to a type of greater size
Implemented case-insensitive hash generation
3 Oct 2022
Hotfix for SerializedHash32
incorrectly clearing hash when string has been stripped
TagString
TextEvent
now reports visible text and rich text offset+length pairs
Reduced garbage generated by string methods
MathUtil
renamed toMathUtils
for consistency
4 Sept 2022
Hotfix for incorrect SerializedHash32
hashes being masked in editor
Hotfix for BlockParser block error state not propagating correctly
Added support for IGNORE_UNITY_EDITOR
define to disable debug checks in editor
29 Aug 2022
Hotfix for RectTransformPinned
to handle objects behind camera
Hotfix for CameraHelper.HeightForDistanceAndFOV
calculation
Memory "dump to string" utilities
Reduced memory usage of debug font
19 Aug 2022
Hotfix for CameraRenderScale.PixelHeight
setter
Improved consistency CameraFOVPlane.SetTargetPreserveFOV
19 July 2022
Hotfix for StringUtils.Args.Splitter
state corruption
19 July 2022
Hotfix for Bits.Count
hang
18 July 2022
StringSlice.Split improvements for thread safety and better configurability
- Added
StringSlice.Split
configuration option to limit number of slices - New
Enums
utility class to convert generic enums to/from integral types - Added methods in
Bits
utility class to operate on generic flag enums - New
Batch
utility class to group items together by batch id and dispatch callbacks on sets
Bits.ContainsMask
renamed toBits.ContainsAny
CharStreamParams
factory methods contain an additionalOwner
argument, to ensure garbage collection doesn't sweep up source of pinned buffers
- Using
Colors.Hex
in a static initializer will no longer crash
- Improved thread safety of
StringSlice.Split
operations involvingISplitter
StringUtils.ArgsList.Splitter
can now specify if quotes should be stripped from arguments
12 July 2022
Fixed BlockParser leftover buffer corruption issues. Added additional StringBuilder argument to IBlockGenerator callbacks
- Fixed
CharStream.Insert
occasional buffer corruption
- Added
StringBuilder
argument toIBlockGenerator.TryEvaluatePackage
andIBlockGenerator.TryEvaluateMeta
as additional context
10 July 2022
Updating for 2020.1+ compatibility. Adjusted CameraFOVPlane math for stability when altering clipping planes.
CameraHelper.TryGetDistance
methods now return distance from the camera transform to the target plane, not the distance from the near clip plane to the target plane.
BlockParser
no longer erroneously reports errors when setting content via aBlockContent
attribute
- Updated several classes to avoid compiler warnings/errors in Unity 2020.1+.
21 June 2022
Critical bug fix in BlockParser for a stream insertion error.
IBlockParserUtil.InsertStream
will properly defer processing on any unprocessed characters from the current stream
- Implemented
CharStream.InsertBytes
andCharStream.InsertChars
, making buffer types a proper deque
20 June 2022
Unified character/byte stream interface. Implemented BlockParser
streaming behavior.
- Added
CharStream
to handle reading bytes/chars from streams, strings, arrays, and unmanaged memory - Overhaul of
BlockParser
parsing behavior for performance and memory usage
- Added unsafe Quicksort implementation to
Unsafe
- Added unsafe methods for retrieving
NativeArray
instance pointers - Added
StringBuilderSlice
for slicing StringBuilder instances. Use with caution! CustomTextAsset
no longer caches the source string by default