I’m creating a new control and adding it to a geometry like so.
String name = "button" + controlTotal;
Button button = new Button(name,font,gameManager,this,settings);
button.setSize(new Size(500,500));
button.setLocation(new Location(450,450));
Geometry geometry = new Geometry(name, new Quad(1,1));
Material material = new Material(app.getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
material.getAdditionalRenderState().setBlendMode(RenderState.BlendMode.Alpha);
geometry.setMaterial(material);
geometry.addControl(control);
node.attachChild(geometry);
Everytime I run this it tells me the control has already been added. I have no clue what is happening here. Can someone help me out? Thanks.