using System;
using UnityEngine;
namespace Framework.Services {
/// Base class for dependency-injected script components
///
/// Derive your service-consuming components from this class in order
/// to have their Inject() method called (with all service dependencies
/// constructed and provided). If you override the Awake() method, do
/// not forget to call base.Awake() as the first thing you do.
///
public abstract class ScriptComponent : MonoBehaviour {
/// Called when the script component gets loaded into a game object
protected virtual void Awake() {
ServiceInjector.InjectDependencies(this);
}
}
} // namespace Framework.Services