The diagram below illustrates the architecture and component relationships within the Easy Grid Builder Pro 2 system. It provides an overview of the core classes, their responsibilities, and how they interact with one another to manage the grid system's features.
This diagram highlights only the core classes of Easy Grid Builder Pro 2, not the entire class structure.
Accessing Grid Manager Class
The Grid Manager class in Easy Grid Builder Pro 2 serves as the central hub for the entire system. It provides access to nearly all aspects of the system. Let’s explore the Grid Manager class and learn the proper way to interact with it.
using UnityEngine;
using SoulGames.EasyGridBuilderPro; // Import the EasyGridBuilderPro namespace
/// <summary>
/// Example script demonstrating how to cache and use the GridManager instance.
/// </summary>
public class APIDocumentationClass : MonoBehaviour
{
// Private variable to hold a reference to the GridManager instance
private GridManager gridManager;
private void Start()
{
// Cache the singleton instance of GridManager for future use
gridManager = GridManager.Instance;
// Example: Log the active grid width to the console
Debug.Log(gridManager.GetActiveEasyGridBuilderPro().GetGridWidth());
}
}