using System;
using UnityEngine;
using Framework.Support;
namespace Framework.Services {
/// Manages and provides access to a game object holding the services
public static class SettingsRoot {
/// Name of the game object that contains the settings
public const string SettingsGameObjectName = "Settings";
/// Retrieves the game object holding the settings
/// The game object containing the settings
public static GameObject Get() {
if(GameObjectHelper.IsNullOrDestroyed(settingsGameObject)) {
settingsGameObject = GameObject.Find("/" + SettingsGameObjectName);
}
return settingsGameObject;
}
/// Game object that is holding the services
private static GameObject settingsGameObject;
}
} // namespace Framework.Services