public override void Invalidate() { if (isClone) { base.Invalidate(); return; } DestroyAllClones(); var value = root.Get(property); var iter = value as IEnumerable; if (iter == null) { return; } foreach (var v in iter) { var c = Instantiate(gameObject, transform.parent); var fe = c.GetComponent <ForEach>(); fe.isClone = true; fe.original = this; fe.context = v; c.SetActive(true); fe.Invalidate(); clones.Add(c); } }
protected object GetValue() { if (property == "$self") { return(root.context); } else { return(root.Get(property)); } }