Transform FindObject(Transform parent, string name, int id = -1)
{
string baseName = (name) + (id == -1 ? "" : "_" + id);
//find base object (the animation node). Create if it doesn't exist
var baseGO = parent.Find(baseName);
if (baseGO == null)
{
baseGO = new GameObject(baseName).transform;
baseGO.parent = parent;
baseGO.localPosition = Vector3.zero;
}
return baseGO;
}