Skip to content

A set of utility classes and components useful to any Unity project, 2D or 3D.

License

Notifications You must be signed in to change notification settings

DerploidEntertainment/UnityUtil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnityUtil

A set of utility classes and components useful to any Unity project, 2D or 3D.

Work in progress!

This package has been under open-source development since ~2017, but only since late 2022 has it been seriously considered for "usability" by 3rd parties, so documentation content/organization are still in development.

Contents

Installing

  1. Make sure you have both Git and Git LFS installed before adding this package to your Unity project.
  2. Add the UnityNuGet scoped registry so that you can install NuGet packages through the Unity Package Manager.
  3. Install dependencies in your Unity project. This is an opinionated list of 3rd party assets/packages that UnityUtil leverages for certain features. Unfortunately, some of these assets cost money. In the future, UnityUtil's features will be broken up into separate packages, so that users can ignore specific packages and not spend money on their Asset Store dependencies.
  4. In the Unity Editor, open the Package Manager window, click the + button in the upper-left and choose Add package from git URL....
  5. Paste a URL like the following:
    • https://github.com/DerploidEntertainment/UnityUtil.git?path=/UnityUtil/Assets/<package>#main for the latest stable version of <package> (see the list of packages below)
    • https://github.com/DerploidEntertainment/UnityUtil.git?path=/UnityUtil/Assets/<package>#unity<unityVersion> for the latest stable version of <package> built against Unity <unityVersion> (e.g., unity6)
    • https://github.com/DerploidEntertainment/UnityUtil.git?path=/UnityUtil/Assets/<package>#<version>-unity<unityVersion> for <version> of <package> built against Unity <unityVersion> (e.g., 0.1.0-unity6)
    • https://github.com/DerploidEntertainment/UnityUtil.git?path=/UnityUtil/Assets/<package>#unity<unityVersion>-dev for the latest development version of <package> built against Unity <unityVersion>. These versions are bleeding-edge and very likely to contain bugs!

Updating

You can update this package from Unity's Package Manager window, even when it is imported as a git repo. Doing so will update the commit from which changes are imported. As the API stabilizes, I will move this package to OpenUPM and add a changelog to make its versioning more clear.

Packages

Note on IL2CPP

Sometimes, you need to preserve code elements from managed code stripping by IL2CPP during builds. For example, your app may produce runtime code that doesn't exist when Unity performs the static analysis, e.g. through reflection and/or dependency injection. You can use Unity's [Preserve] mechansim to preserve these elements in your own code; however, UnityUtil intentionally does not annotate any code with [Preserve] so that you have total control over the size of your builds. Therefore, if you need to preserve UnityUtil code elements (types, methods, etc.), then you must use the link.xml approach described in the Unity Manual.

Support

For bug reports and feature requests, please search through the existing Issues first, then create a new one if necessary.

Contributing

Make sure you have Git LFS installed before cloning this repo.

To build/test changes to this package locally, you can:

  • Open the test Unity project under the UnityUtil/ subfolder. There you can run play/edit mode tests from the Test Runner window.
  • Open the Visual Studio solution under the src/ subfolder. Building that solution will automatically re-export DLLs/PDBs to the above Unity project.
  • Import the package locally in a test project. Simply create a new test project (or open an existing one), then import this package from the local folder where you cloned it.

See the Contributing docs for more info.

License

MIT

About

A set of utility classes and components useful to any Unity project, 2D or 3D.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages