Table of Contents

Contributors Forks Stargazers Issues


Logo

Common

Shared utilities, helpers, and base components for Definitive Infinity Media Unity projects. Designed to reduce duplication and provide a consistent set of lightweight building blocks for editor and runtime development. Compatible with Unity 2022 LTS and later.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Dependencies
  5. Roadmap
  6. Contributing
  7. Contact
  8. Acknowledgments

About The Project

A reusable utility library that centralizes patterns and helpers used across Definitive Infinity Media's Unity projects. The package's goals are to reduce duplicated code, make common tasks faster to implement, and provide a stable foundation for small-to-medium sized Unity projects.

Key features:

  • Extensions: Helpful extension methods for Unity types (Collections, Transforms, GameObjects, etc.)
  • Helpers: Editor and runtime utilities for common workflows (logging, serialization helpers, coroutines, etc.)
  • Base Classes: Lightweight, reusable base classes and components to accelerate development
  • Compatibility: Targeted for Unity 2022 LTS and newer; focused on minimal dependencies

This package is intended for internal reuse but is suitable as a public utility package for other projects as well.

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

Unity Engine (2022 LTS recommended). A Unity project where you can add packages via the Package Manager.

Installation

Package Manager (Git URL)

  1. Open Window → Package Manager in your Unity project.
  2. Click the add [+] button in the top-left and choose "Add package from git URL...".
  3. Paste the repository URL and click Add:
https://github.com/Definitive-Infinity-Media/com.definitiveinfinitymedia.common.git

This will add the package directly from the repository (useful for development or when consuming the latest changes).

Package Registry (GitHub Packages)

If you publish packages to GitHub Packages, you can configure a scoped registry in Unity so the package appears in the Package Manager.

Registry settings:

If your registry requires authentication, create a .upmconfig.toml in your user directory with credentials. Example:

[npmAuth."https://npm.pkg.github.com/@Definitive-Infinity-Media"]
token = "{PERSONAL_ACCESS_TOKEN}"
email = "{email@example.com}"
alwaysAuth = true

Refer to Unity's documentation for Scoped Registries and GitHub Packages for detailed steps.

Git (clone)

Clone the repo into your project's Packages folder if you prefer to edit the package locally:

git clone https://github.com/Definitive-Infinity-Media/com.definitiveinfinitymedia.common.git Packages/com.definitiveinfinitymedia.common

This allows you to modify the package source inside your project and iterate quickly.

(back to top)

Usage

Below is a minimal example demonstrating how you might use a typical helper or extension from this package. Replace the class/method names below with the actual types provided by the library.

using DefinitiveInfinityMedia.Common;
using UnityEngine;

public class ExampleBehaviour : MonoBehaviour
{
    void Start()
    {
        // Example: safe disable an object using a provided helper
        var obj = GameObject.Find("SomeObject");
        if (obj != null)
        {
            // Assuming the package provides an extension called SafeSetActive
            obj.SafeSetActive(false);
        }
    }
}

For full examples and API documentation, see the documentationUrl in package.json: https://com-definitiveinfinitymedia-common.pages.dev/

(back to top)

Dependencies

This package has no required external runtime dependencies declared in package.json. If you use optional features that rely on other packages, they will be documented in the API docs.

Package Version
None -

Roadmap

  • [ ] Feature 1
  • [ ] Feature 2
  • [ ] Feature 3
    • [ ] Nested Feature

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Contact

Noah Day - @defin_infinity - contact@definitiveinfinitymedia.com

Project Link: https://github.com/Definitive-Infinity-Media/com.definitiveinfinitymedia.common

(back to top)

Acknowledgments

(back to top)