Random button in the corner of my screen that does not appear in the editor

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Lazulily

The title says pretty much everything, I can’t find it!
The game has a zoom in and out function and the UI stays on the screen no matter what, but you can zoom in on this button, and the only other place for the location of that button to be is on the main scene but there’s only a few things on there and I barely touched it while adding a new feature which is literally just a particle system that turns on and off based on a value.

My main scene is:

–Tiles (Group Node)
–MouseFollower (KinematicBody2D)
------Collision Shape
–RainParticles_001 (ParticleEmitter2D)
–Canvas Layer
------UIMain (Control Node)

I have no clue why this mystery button is here and only appears on screen when I run the game, this button does not have a texture and every other button I have in the game is textured.

Thanks in advance.

It is a demon button.

You’re not going to get help without a screen or something that shows us what this ‘button’ is on screen otherwise its just speculation. However, you could try disabling each element (one at a time) in your tree and see how this affects the mystery button. If it’s just in the main scene, only runs this scene. Process of elimination.

spaceyjase | 2021-11-19 12:00

:bust_in_silhouette: Reply From: Inces

Aren’t you creating it from script somewhere ? It is especially possible if the corner you are talking about is top left, which makes for default Vector2.zero position. Take your scripts and ctrl+F for Button keyword, You might find Button.new() somewhere.

I went through my scripts and not a single instance of Button.new() is found anywhere, the closest thing is Building.new() but that is not a button and it’s own manual made class, and I haven’t touched that class at all.

Lazulily | 2021-11-20 00:47

You can also check it out in REMOTE tab of project. There are 2 tabs above your editors SceneTree - Scene and Import. When project is running, there appears another Tab options, a liitle below : Local and Remote. Press Remote, and You can find this button in actual running projects scene tree, You will know whose child it is

Inces | 2021-11-20 11:52

Okay so I found it, it’s a button that must’ve been an old version of another button, it is apparently in the root, but I still can not find it, and saving it as a scene does nothing, can’t even see the saved scene. I turned off it’s visibility and it went away but it doesn’t stay invisible the next time I run the scene obviously.
I think I need to call it in a script so that when the scene starts it turns the button off, makes it invisible.

Lazulily | 2021-11-21 23:49

I figured it out, it’s because I called the button in an autoload, it’s gone now, thank you for your help!

Lazulily | 2021-11-21 23:53