Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17119

Item instantiate in layout [bug?]

$
0
0

@ozergul wrote:

Hi,
I have a prefab and I instantiate it to a layout.

After instantiate, these items are not arranged in Layout.

Are there any method to update Layout View?

for (var i = 0; i < g_array.length; i++) {
    // create node by prefab
    var new_node = cc.instantiate(this.label_prefab)

    new_node.parent = this.node
    new_node.getComponent("cc.Label").string = g_array[i]

    console.log(new_node) // works
}

I found my problem. This was a check problem in Widget at prefab.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17119

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>