mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-24 00:58:59 -05:00
20 lines
514 B
C#
20 lines
514 B
C#
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace UnityAtoms
|
||
|
{
|
||
|
[AddComponentMenu("Unity Atoms/Variable Resetter")]
|
||
|
[DefaultExecutionOrder(Runtime.ExecutionOrder.VARIABLE_RESETTER)]
|
||
|
public class VariableResetter : MonoBehaviour
|
||
|
{
|
||
|
public List<AtomBaseVariable> _variables = new List<AtomBaseVariable>();
|
||
|
|
||
|
void OnEnable()
|
||
|
{
|
||
|
for (var i = 0; i < _variables.Count; ++i)
|
||
|
{
|
||
|
_variables[i].Reset();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|