Utilities.Extensions
Common extensions for Unity types (UPM)
Unity Project
Download the source from GitHub

README
com.utilities.extensions
Common extensions for for the Unity Game Engine types.
Installing
Requires Unity 2021.3 LTS or higher.
The recommended installation method is though the unity package manager and OpenUPM.
Via Unity Package Manager and OpenUPM
Terminal
openupm add com.utilities.extensions
Manual
- Open your Unity project settings
- Select the
Package Manager
- Add the OpenUPM package registry:
- Name:
OpenUPM - URL:
https://package.openupm.com - Scope(s):
com.utilities
- Name:
- Open the Unity Package Manager window
- Change the Registry from Unity to
My Registries - Add the
Utilities.Extensionspackage
Via Unity Package Manager and Git url
- Open your Unity Package Manager
- Add package from git url:
https://github.com/RageAgainstThePixel/com.utilities.extensions.git#upm
Documentation
Runtime Extensions
- Addressables Extensions
- Component Extensions
- GameObject Extensions
- Transform Extensions
- Unity.Object Extensions
- NativeArray Extensions
- AsSpan: Converts a NativeArray to a Span for versions of Unity that do not support
NativeArray.AsSpan(). - MemoryStream.ToNativeArray: Converts a MemoryStream to a NativeArray with minimal allocations.
- CopyFrom: Copies data from one NativeArray to another while being able to specify the start index and length of data to copy.
- ToBase64String: Converts a NativeArray to a Base64 string with minimal allocations.
- FromBase64String: Converts a Base64 string to a NativeArray with minimal allocations.
- WriteAsync: Writes to a Stream from a NativeArray asynchronously with minimal allocations.
- AsSpan: Converts a NativeArray to a Span for versions of Unity that do not support
Runtime Utilities
- SerializedDictionary: A generic dictionary that can be serialized by Unity's serialization system, allowing you to use dictionaries in your MonoBehaviour and ScriptableObject classes.
Editor Extensions
- EditorGUILayout Extensions
- SerializedProperty Extensions
- ScriptableObject Extensions
- Unity.Object Extensions
Editor Utilities
- AbstractDashboardWindow
- Regenerate Asset Guids: A utility to regenerate the GUIDs of all assets in the project or a specified directory.
- Script Icon Utility: A utility to set a custom icon for all scripts inside of a specified directory.
- A component context utility to upgrade and downgrade components from derived, non-abstract types.
Attributes
- SceneReferenceAttribute: When added to a serialized string field, it will render the scene picker in the inspector, allowing you to select a scene from the project. If the scene is not in the build settings, it will be added automatically.
Behaviours
- LoadSceneButton: A simple uGUI button that loads a scene when clicked.
Comments
No comments yet. Be the first!
Sign in to join the conversation
Sign In