using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
namespace UnityEngine.AdaptivePerformance
{
///
/// Adaptive Performance Loader abstract class used as a base class for specific provider implementations. Providers should implement
/// subclasses of this to provide specific initialization and management implementations that make sense for their supported
/// scenarios and needs.
///
public abstract class AdaptivePerformanceLoader : ScriptableObject
{
///
/// Initialize the loader. This should initialize all subsystems to support the desired runtime setup this
/// loader represents.
///
///
/// Whether or not initialization succeeded.
public virtual bool Initialize() { return true; }
///
/// Ask loader to start all initialized subsystems.
///
///
/// Whether or not all subsystems were successfully started.
public virtual bool Start() { return true; }
///
/// Ask loader to stop all initialized subsystems.
///
///
/// Whether or not all subsystems were successfully stopped.
public virtual bool Stop() { return true; }
///
/// Ask loader to deinitialize all initialized subsystems.
///
///
/// Whether or not deinitialization succeeded.
public virtual bool Deinitialize() { return true; }
///
/// Gets the loaded subsystem of the specified type. This is implementation-specific, because implementations contain data on
/// what they have loaded and how best to get it.
///
///
/// Type of the subsystem to get.
///
/// The loaded subsystem, or null if no subsystem found.
public abstract T GetLoadedSubsystem() where T : class, ISubsystem;
///
/// Gets the loaded default subsystem.
///
/// The loaded subsystem, or null if no default subsystem is loaded.
public abstract ISubsystem GetDefaultSubsystem();
///
/// Gets the Settings of the loader used to descibe the loader and subsystems.
///
/// The settings of the loader.
public abstract IAdaptivePerformanceSettings GetSettings();
}
}