Forums

OverviewV-Play 1 Support › How can I iterate through all the elements in an entity?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7776

    Stan

    I would like to iterate through all the elements in an entity and print the x,y co-ordinates of the corners of all the elements on the screen. The way I was thinking of doing this is:

    1) iterate through all elements in entity

    2) For each element create a Text element with the co-ords of that elements in the text field

     

    Is there an easy way to do this?

    #7777

    Alex
    V-Play Team

    Hi Stan,

    just to be clear, do you want to

    • iterate through all child items of an entity, meaning it’s not entity specific, more like iterate through all child items of a parent item in general
    • or iterate through all entities of a specific entityType

    Cheers,
    Alex

    #7778

    Stan

    The first case :-)

    #7779

    Alex
    V-Play Team

    You can just take <entityId>.children to get a standard JavaScript array of the child items.

    Cheers,
    Alex

Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support