Beispiel #1
0
    void AddToModelView()
    {
        if (model is ValueType)
        {
            return;
        }
        ModelViewBehaviour mv = null;// = GetComponentInParent<ModelViewBehaviour>();
        var parent            = transform;

        while (parent != null)
        {
            mv = parent.GetComponent <ModelViewBehaviour>();
            if (mv != null)
            {
                break;
            }
            parent = parent.parent;
        }

        if (mv != null)
        {
            mv.AddModelView(this.model, this);
        }
    }
Beispiel #2
0
 void Awake()
 {
     mvb        = GetComponent <ModelViewBehaviour>();
     theme      = GetComponent <ThemeListener>();
     targetView = new TargetView(GetComponent <Canvas>());
 }