Пример #1
0
    void Start()
    {
        DMComposite root = new DMComposite("Root");

        DMLeaf      leaf1       = new DMLeaf("GameObject");
        DMLeaf      leaf2       = new DMLeaf("GameObject (2)");
        DMComposite gameObject1 = new DMComposite("GameObject (1)");

        root.Add(leaf1);
        root.Add(gameObject1);
        root.Add(leaf2);

        DMLeaf child1 = new DMLeaf("GameObject");
        DMLeaf child2 = new DMLeaf("GameObject (1)");

        gameObject1.Add(child1);
        gameObject1.Add(child2);

        ReadComPonent(root);
    }