Ability to search entire game for an asset ID

As a Roblox developer, it is currently too hard / tedious to develop a recursive loop that checks throughout an entire game looking for one specific asset ID (of any kind).
edit: it was easy

If Roblox is able to address this issue, it would improve development time spent optimization specific assets, and ensure a through search throughout all hierarchies of the game.

I imagine this would be very similar to the current “Find In All Scripts” feature, but for AssetIDs

11 Likes

Is this only for assets that are properties of instances? You may run into issues where you have the asset stored in a config script or StringValue somewhere that will not be picked up. Is this fine?

1 Like

If someone puts an asset ID into a StringValue, or even in a script (then they can use Find in all scripts to find it), I believe they understand where that asset is. Compare that to an asset that is solely in-game for visual aesthetics where it is never touched once downloaded by the client during play.

1 Like

More abstractly, wouldn’t a search through all string properties be nicer, so that you could search for things like names too?

1 Like

This is still a problem causing my team great distress as we try to optimize our textures, it is extremely difficult to find some textures that were not picked up in one of my loops

This new feature to find which assets are causing the most memory usage in your game is great.

However, the problem still persists that sometimes assets are incredibly hard to find in the game, due to a large amounts of parts, meshparts, and unions within the same area and selecting individual items out of those is near impossible. The OP would be the next logical step in improving the developer’s ability to optimize game performance. I am looking for an engineer to say they acknowledge this as a problem, thank you.

1 Like
local ID_LOOK = "000000"
local t = 0
local function Recurse(model)
	local m = model:GetChildren()
	for i = 1, #m do
		t = t + 1
		if t % 200 == 0 then
			wait()
		end
		if m[i]:IsA("MeshPart") then
			if string.match(tostring(m[i].TextureID), ID_LOOK) then
				print("here it is mesh part!", m[i].Name, m[i].Parent.Name, m[i].Parent.Parent.Name, m[i].Parent.Parent.Parent.Name)
			end
		end
		if m[i]:IsA("Decal") then
			if string.match(tostring(m[i].Texture), ID_LOOK) then
				print("here it is decal!", m[i].Name, m[i].Parent.Name, m[i].Parent.Parent.Name, m[i].Parent.Parent.Parent.Name)
			end
		end
		if m[i]:IsA("Texture") then
			if string.match(tostring(m[i].Texture), ID_LOOK) then
				print("here it is texture!", m[i].Name, m[i].Parent.Name, m[i].Parent.Parent.Name, m[i].Parent.Parent.Parent.Name)
			end
		end
		if m[i]:IsA("ImageLabel") then
			if string.match(tostring(m[i].Image), ID_LOOK) then
				print("here it is ImageLabel!", m[i].Name, m[i].Parent.Name, m[i].Parent.Parent.Name, m[i].Parent.Parent.Parent.Name)
			end
		end
		if m[i]:IsA("ImageButton") then
			if string.match(tostring(m[i].Image), ID_LOOK) then
				print("here it is ImageButton!", m[i].Name, m[i].Parent.Name, m[i].Parent.Parent.Name, m[i].Parent.Parent.Parent.Name)
			end
			if string.match(tostring(m[i].HoverImage), ID_LOOK) then
				print("here it is ImageButton hover!", m[i].Name, m[i].Parent.Name, m[i].Parent.Parent.Name, m[i].Parent.Parent.Parent.Name)
			end
		end
		Recurse(m[i])
	end
end

Recurse(workspace)
print"______________"
print"DONE workspace"
Recurse(game.ReplicatedStorage)
print"DONE ReplicatedStorage"
Recurse(game.StarterGui)
print"DONE StarterGui"
Recurse(game.ReplicatedFirst)
print"DONE ReplicatedFirst"
Recurse(game.ServerStorage)
print"DONE ServerStorage"``
8 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.