# 🚀 Getting Started

This guide will walk you through installation and initial setup so you can start managing network status detection like a pro. 💪


# 📦 Installation

Installing EazyNetChecker is quick and easy:

  1. Download and import EazyNetChecker from the Unity Asset Store.
  2. By default, the asset will be placed under Assets/Hellmade/EazyNetChecker
  3. EazyNetChecker requires the Newtonsoft Json package. Unity will prompt you to install it if it’s not already present in your project.

You can access the EazyNetChecker editor by navigating to Window > Hellmade Games > Eazy NetChecker > Main Window

# ⚙️ Setup

Initializing and setting up EazyNetChecker is super simple! You just need to:

  • Generate required assets
  • Initialize EazyNetChecker system for runtime use.

# Generate required assets

Before you can use EazyNetChecker, you need to generate and initialize a few required assets. Without them, the system cannot function.

These assets include:

  • A configurations asset
  • 2 internal method database assets

When you first open the EazyNetChecker window, you’ll see a screen like this:

Required assets initialization
Required assets initialization

Click the Initialize button to automatically create all the required assets.

Once initialized, the assets will be created at the following path:

Assets/Resources/EazyNetChecker/EazyNetCheckerConfig.asset
Assets/Resources/EazyNetChecker/EazyNetCheckerBuiltInDatabase.asset
Assets/Resources/EazyNetChecker/EazyNetCheckerCustomDatabase.asset

# Update from legacy version

If you are upgrading from a previous legacy version of EazyNetChecker (1.x.x), you need to migrate your existing custom check methods to the new system, and adapt your code to the new API. Please refer to the Upgrade guide for detailed instructions on how to do, before proceeding with the rest of this guide.


# ⚙️ System Initialization

EazyNetChecker must be initialized before you use any runtime API, resolve methods, or create services. You have three options depending on how you structure your project.

# Option 1: Use the static facade (Beginner-friendly)

Call EazyNetChecker.Initialize() once, then use the static API. This calls the default builder internally and wires everything up.

EazyNetChecker.Initialize();

Best for Small to mid projects or when a singleton style API is acceptable.
👍 Fastest setup, minimal code.
👎 Less control over lifecycle and wiring.

# Option 2: Build a system instance (Advanced)

Use this when you want full control or are using dependency injection. EazyNetCheckerSystemBuilder builds the system and also injects it into the static facade. This way, You decide when the system is created and how to keep track of its instance, as well as how you pass around references to it or its subsystems. It is also useful more for tests or when switching gameplay contexts.

var builder = new EazyNetCheckerSystemBuilder();
var system = builder.Build();

Best for DI setups, custom lifecycle management, tests, or multiple runtime contexts.
👍 Full control, easy to inject, no scene dependency.
👎 You manage when it is created and disposed.

# Option 3: Use the Bootstrapper component

Add EazyNetCheckerBootstrapper to a scene. It can initialize in Awake automatically, or you can call InitializeSystem() yourself if you want manual timing.

public class MySceneScript : MonoBehaviour
{
    [SerializeField] private EazyNetCheckerBootstrapper netCheckerBootstrapper;

    private void Start()
    {
        netCheckerBootstrapper.InitializeSystem();
    }
}

Best for Scene driven setups or teams that prefer editor based initialization.
👍 No code needed if Initialize In Awake is enabled.
👎 Requires a scene object and initialization timing depends on scene load.


# 🚀 Run your first check

With EazyNetChecker initialized, you can now run your first network status check! Here’s a quick and easy way to do it using the built-in global service.

// Access the global service
var globalService = EazyNetChecker.GlobalService;

// Start a single check
globalService.RunSingleCheck(result =>
{
    Debug.Log($"Check completed. Status: {result.Status}");
});