19 lines
447 B
C#
19 lines
447 B
C#
using UnityEngine;
|
|
|
|
namespace ScriptableObjectArchitecture.Examples
|
|
{
|
|
public class ObjectAdder : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private GameObjectCollection _targetCollection = default(GameObjectCollection);
|
|
|
|
private void OnEnable()
|
|
{
|
|
_targetCollection.Add(gameObject);
|
|
}
|
|
private void OnDisable()
|
|
{
|
|
_targetCollection.Remove(gameObject);
|
|
}
|
|
}
|
|
} |