|
using UnityEngine;
|
|
|
|
namespace PMaker.DependencyInjection
|
|
{
|
|
public class InstanceMonobehaviour : BaseBehaviour
|
|
{
|
|
protected virtual void Awake()
|
|
{
|
|
IoC.AddInstance(this);
|
|
}
|
|
|
|
protected virtual void OnDestroy()
|
|
{
|
|
IoC.RemoveInstance(this.GetType(), this);
|
|
}
|
|
}
|
|
|
|
} |