ScriptableObjects are found randomly

Hey guys,

I do have a problem to find ScriptableObjects.

I did create some ScriptableObjects in the Editor.

With following Example I try to get them:

ScriptableObjects[] so= Resources.FindObjectsOfTypeAll<ScriptableObjects>();

The problem is, that i can Play 100 times, and all the time I have a different behaviour.
Sometimes it can find all ScriptableObjects, sometimes only one, but most time none.

For example, If i want to Instantiate an GameObject with ScriptableObjects-Data and attach a SO to a Prefab, it works 2-3 times with all ScriptableObjects, then only with one and then 0 again. And I do nothing else, than press the Play-Button.

I really hope, I could explain it well.


Ok, i think i found the problem. I attach now the SOs to a List before in Awake() and they can be found all.