Make a scene not launch by itself

This may be a really easy question or really hard, I feel like remember from a few updates ago a function or something was added that would make scenes be unable to be played (when like pressing F6) and only work as children of other scenes.

Firstly, does this actually exist and if so what is it called and how do I implement it? Thanks!

EDIT: While abstract was what I was thinking of, it wasn’t what I thought it did. The second response has a good method for anyone who is looking to achieve what I thought it did.

Wait…is that even a thing? Nahhh
You can run any scene on your project.

Something like:

func _ready() → void:
if get_tree().current_scene == self:
get_tree().quit() ## might need to call_deferred or wait a frame

I usually check this condition to setup things a scene needs to run on its own that normally come from outside, like a camera, a worldboundary, etc. Running just the scene you’re working on is a huge time-saver once your game/app grows in size.

Maybe you are thinking of abstract classes/methods? But that makes the designated script un-instantiate-able until the abstract methods are defined in an extended script which may be instantiate-able.

Yeah it was abstract I’m pretty sure. I just wanted to remember what it was called to see if it would fix the problem I have.

(which isn’t a problem just annoying cause whenever I launched a certain scene dependent on being in another scene I have to restart godot cause it keeps thinking I’m trying to start that scene by itself.)

Yeah, especially when it means you have to restart godot if you run the wrong scene by itself (it happens a lot :sob:)