Skip to content

MeeXaSiK/MonoCache

Repository files navigation

🚄 MonoCache

License Version Unity

MonoCache is a fast framework for caching Unity update methods by Night Train Code

🚀 The framework caches Unity update methods, which improves performance

🌐 Navigation

▶ Installation

As a Unity module

Supports installation as a Unity module via a git link in the PackageManager

https://github.com/MeeXaSiK/MonoCache.git

or direct editing of Packages/manifest.json:

"com.nighttraincode.monocache": "https://github.com/MeeXaSiK/MonoCache.git",

As source

You can also clone the code into your Unity project.

🔸 How to use

Just use these MonoCache methods instead of the basic ones.

using NTC.MonoCache;

public class Demo : MonoCache
{
    protected override void OnEnabled()
    {
        // Replaces base "OnEnable()" method.
    }

    protected override void OnDisabled()
    {
        // Replaces base "OnDisable()" method.
    }

    protected override void Run()
    {
        // Replaces base "Update()" method.
    }

    protected override void FixedRun()
    {
        // Replaces base "FixedUpdate()" method.
    }

    protected override void LateRun()
    {
        // Replaces base "LateUpdate()" method.
    }
}