How to exclude a directory from autofill in Godot 4
Asked Answered
K

2

6

After exporting my project to Android a directory named .godot/exported appeared in the root of my Godot project. It seems to contain some cache for the resources I have exported.

Problem is, autofill gets scenes from it when I type stuff like get_tree().change_scene_to_file and it messes with my ability to find the resources I need.

Do you know if there is an option in Godot 4 which allows users to exclude specific directories from autofill?

enter image description here

Edit1: I am using Godot v4.1.1 under Ubuntu 22.04.3 LTS. I thought this information might be useful.

I have .godot/ directory in my .gitignore and the files from there are not tracked by git but are still popping up in the autofill for the change_scene_to_file method. I checked that preload() doesn't show resources from .godot/ directory as this Godot doc page describes but it is not my current issue.

Kerguelen answered 13/1 at 19:37 Comment(0)
U
2

Godot 4 shouldn't be showing you the contents of the .godot folder (it does not by default). Thus something else went wrong.

Anyway, you can tell Godot to ignore a folder and all its contents by adding a file with the name .gdignore inside fo it. This is briefly mentioned in Project organization.

Uruguay answered 14/1 at 3:27 Comment(0)
L
3

You are mistaking .gitignore with .gdignore, the last one tells to Godot editor to ignore certain folder, you have to create an empty file with name .gdignore inside the folder you want to ignore.

Launder answered 30/5 at 13:43 Comment(1)
You're right... I misread that filenameKerguelen
U
2

Godot 4 shouldn't be showing you the contents of the .godot folder (it does not by default). Thus something else went wrong.

Anyway, you can tell Godot to ignore a folder and all its contents by adding a file with the name .gdignore inside fo it. This is briefly mentioned in Project organization.

Uruguay answered 14/1 at 3:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.