Question about Scriptable objects and Resource.FindObjectOfTypeAll

I have started a new project which uses Scriptable objects.
When the game is loaded I want to find all the scriptable Objects and cache them inside a list.
I use Resource.FindObjectsOfTypeAll It does work but I am seeing some weird behaviour where it sometimes doesn’t find all the scriptable objects in the asset folder.
Is it a good idea to use this? is there an alternative method and why sometimes it doesn’t find everything and sometimes it does?

I think you want Resources.LoadAll() to get everything. That works fine for me and it recurses directories.

The Resources method doesn’t look in the assets folder. It looks in the resources folder :slight_smile:

1 Like

Ya, good point sir. I forgot to even consider this most basic fact. :slight_smile:

But back to OP’s original post, the Resources.FindObjectsOfTypeAll apparently ALSO returns internal and disabled objects, so not sure that’s what you want. I still standby using Resources.LoadAll<>() but I’m not sure what his application is.