예제 #1
0
    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);
        }
    }
예제 #2
0
파일: Bind.cs 프로젝트: pjc0247/databinder
 protected object GetValue()
 {
     if (property == "$self")
     {
         return(root.context);
     }
     else
     {
         return(root.Get(property));
     }
 }