Sign in to follow this  
inxs

GUI - Cannot Link control

Recommended Posts

Hi all,

I was trying to link my textblock to a mesh but I get the message:

"Cannot link a control to a mesh if the control is not at root level"

Docu says:

"Please note that controls that want to track position of a mesh must be at root level (at AdvancedDynamicTexture level)."

 

But I don't know what that means and how I can fix it.

 

Thank you

Jonny

Share this post


Link to post
Share on other sites

Did you add your text block to another gui element?  If so, try to link the mesh to the gui element that your text block was added to rather than directly to the text block.

Share this post


Link to post
Share on other sites

Hi guys,

thanks for your answer!

Indeed the order was wrong. I had to add the control first in order to link it. Before I had it the other way around.

this.guiOverlay.addControl(textBlock);
textBlock.linkWithMesh(cylX);
 
edit: Another Question:
Is it also possible to link the control to a point instead of a Mesh? This way you always have to create a dummy Mesh.
 
edit2: Unfortunatly the PG in the docu seem not to be working :(
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.