Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom resources don't appear in "quick load" #67119

Closed
ababen1 opened this issue Oct 9, 2022 · 15 comments
Closed

Custom resources don't appear in "quick load" #67119

ababen1 opened this issue Oct 9, 2022 · 15 comments

Comments

@ababen1
Copy link

ababen1 commented Oct 9, 2022

Godot version

v4.0.beta2.official [f8745f2]

System information

Windows 11, GLES3, NVIDIA GeForce GTX 1650, i5-11300H

Issue description

Quick load doesn't detect custom resources

Steps to reproduce

  1. Create a custom resource with a class name
  2. Create a resource of the type you created
  3. Create a new node and attach a script. To that script add an export variable of the same type as the resource you created
  4. Right click -> Quick load, you'll see the list doesn't contain your resource

Minimal reproduction project

Example.zip

@TechnoPorg
Copy link
Contributor

This is expected for now as a result of #66215, which disabled QuickOpen custom resource loading because a refactor is needed for editor data structures to make it work without being prohibitively slow.

@ababen1
Copy link
Author

ababen1 commented Oct 9, 2022

Oh I see. Should I close this issue then?

@akien-mga
Copy link
Member

No the issue can stay open as a reminder that this feature is missing.

@KoBeWi
Copy link
Member

KoBeWi commented Feb 2, 2023

This issue was fixed few betas ago.

@KoBeWi KoBeWi closed this as completed Feb 2, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in 4.x Priority Issues Feb 2, 2023
@Cratesmith
Copy link

This issue was fixed few betas ago.

I'm still experiencing this issue in both 4.0 and 4.0.1
image

@KoBeWi
Copy link
Member

KoBeWi commented Mar 25, 2023

@Cratesmith Please provide a minimal reproduction project.
I tested the one attached in this issue and Resources need a script_class field to appear in Quick Load. If you have resources created before this issue was fixed, you need to re-save them.

@ababen1
Copy link
Author

ababen1 commented Mar 25, 2023

It was fixed for me but I noticed that when I deleted the .godot folder the resources disappeared again

@Cratesmith
Copy link

Cratesmith commented Mar 25, 2023 via email

@lexusinator
Copy link

Same issue here, in Godot 4.1 custom resources still don't show in "Quick Load"

@watsaponk
Copy link

In Godot 4.1 this still happen randomly, it seem like quick load does not recognize old custom resource, and I have to recreate some resource to make it work, not sure what is the cause of this issue maybe some cache file system

@watsaponk
Copy link

addition info, let's say we have 2 custom resources in the project "A" and "B"

  • when I recreate "A" the quick load will only recognize "A" ("B" is disappear from search result, you cannot find them event type the name)
  • then I recreate "B" now quick load will only recognize "B" and "A" is gone from search result

@watsaponk
Copy link

These issues will gone when removing .godot folder and then re-import the project

@KoBeWi
Copy link
Member

KoBeWi commented Oct 1, 2023

From my experience it will re-appear.

@luislodosm
Copy link

luislodosm commented Dec 14, 2023

Same here. Godot 4.2.1

Custom resources:

Captura de pantalla 2023-12-14 a las 11 14 17

Quick load menu:

Captura de pantalla 2023-12-14 a las 11 13 57

It seems that .godot/editor/filesystem_cache8 doesn't reference the rest of the resources. Deleting this file doesn't solve the problem.

If I re-save a resource:

Captura de pantalla 2023-12-14 a las 11 26 19

Then it will appear again in the quick load menu:
Captura de pantalla 2023-12-14 a las 11 26 35

Currently there's not a way to re-save a lot of resources, so I will make a custom plugin for this.
Captura de pantalla 2023-12-14 a las 11 26 48

@luislodosm
Copy link

So I made an editor plugin with a button that resave all my custom resources, so they appear again in the quick load menu:

@tool
extends Button

func _on_pressed():
	var file_paths = get_all_file_paths("res://resources")
	resave_resources(file_paths)

func get_all_file_paths(path: String):
	var file_paths = []
	var dir = DirAccess.open(path)
	dir.list_dir_begin()
	var file_name = dir.get_next()
	while file_name != "":
		var file_path = path + "/" + file_name
		if dir.current_is_dir():
			file_paths += get_all_file_paths(file_path)
		else:
			file_paths.append(file_path)
		file_name = dir.get_next()
	return file_paths
	
func resave_resources(file_paths):
	for path in file_paths:
		if ResourceLoader.exists(path):
			var resource = ResourceLoader.load(path)
			ResourceSaver.save(resource, path)
			print("Re-saved: " + path)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

9 participants