Forums

OverviewV-Play 1 SupportDynamically changing the parent of a QML item › Re: Dynamically changing the parent of a QML item

OverviewV-Play 1 SupportDynamically changing the parent of a QML item › Re: Dynamically changing the parent of a QML item
#4093

Christian
V-Play Team

I’m not sure what you are doing in the level loading with these calls:
1. comp = Qt.createComponent(fileName);
2. item = comp.createObject(loader.parent, {});

How do you load the dynamic levels – with the Loader element?

Also, which entitContainer did you set for the EntityManager? All the entities get placed as child of this element and you should not remove it. So instead of replacing the entityContainer, use the same one.

You could additionally use the onZChanged slot for debuggin the z changes, as it indicates when the game.level item might get changed.

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