mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-21 23:58:49 -05:00
fix: SyncGameObjectToList adding object multiple times to list (#389)
This commit is contained in:
parent
fb471754bc
commit
f75215adba
@ -4,7 +4,7 @@ using UnityEngine.Assertions;
|
||||
namespace UnityAtoms.BaseAtoms
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds a GameObject to a GameObject Value List on OnEnable and removes it on OnDestroy.
|
||||
/// Adds a GameObject to a GameObject Value List on Start and removes it on OnDestroy.
|
||||
/// </summary>
|
||||
[AddComponentMenu("Unity Atoms/MonoBehaviour Helpers/Sync GameObject To List")]
|
||||
[EditorIcon("atom-icon-delicate")]
|
||||
@ -13,7 +13,7 @@ namespace UnityAtoms.BaseAtoms
|
||||
[SerializeField]
|
||||
private GameObjectValueList _list = default;
|
||||
|
||||
void OnEnable()
|
||||
void Start()
|
||||
{
|
||||
Assert.IsNotNull(_list);
|
||||
_list.Add(gameObject);
|
||||
|
Loading…
Reference in New Issue
Block a user