Not creating all Previews in 5.5

So the following code in 5.5 fails to generate all the previews.

            AssetPreview.SetPreviewTextureCacheSize (1024);
            foreach (My_Items item in _items) {
                Debug.Log(_items.Count);/// 223 items exist
                if (!_previews.ContainsKey (item)) {
                
                    Texture2D preview = AssetPreview.GetAssetPreview (item.gameObject);
                
                    if (preview != null) {
                    
                        _previews.Add (item, preview);
                        /// stops generating previews at 45
                    }
                }
            }

In earlier versions, it runs no problem. Really struggling to decipher what changed.

My_Items contains 223 “items”. But at this point, it can’t seem to get past 45 previews for the 223 items found.

This exact same code, running in 5.1 finds there to be 223 items, and generates all 223 previews.

What am I missing here?

Update:

I can now at least get the preview count and item count to match (just added a redundant “if previews < items”), but it is still returning null textures for 90% of the items.

I’ve taken the cache size all the way up to 8000 and that isn’t making a difference.

I’ve look at all of the null preview threads, which are all from really old versions of Unity, but none of the suggestions are working.

This really feels like a bug.

anyone from Unity able to provide some insight here?

Could you submit a bug report so we can take a look please?

Will do thanks

Ok so it in fact is not related to 5.5 but rather any project, in any version of unity that is not where the code originated.

I made it in 5.1.3f.

If I open the project I made it in, all thumbnails are generated no problem, every time. If I make a new project, in 5.1.3f, paste the exact same entire directory from my working project into the new project, it won’t build all thumbnails and therefore doesn’t work.

Earlier today, I thought I had it fixed as I noticed that it was in fact working in a different project, inside of 5.1.3f after I simply copied the whole directory (almost 3gbs – I had only been copying the code).

I then did the same thing, I copied the entire directory and pasted it in my 5.5 test project and it once again worked. Thinking I had it solved, I went back to 5.1.3f to tidy things up for the push up to the store and once I ran my editor again, it returned to not building all the thumbnails. It has since stop building all the thumbs in any project other than the one I made it in.

@karl_jones does anything here sound like something you might be familiar with? I don’t mind making a bug report, but now I’m even more confused about the issue. I’ve never seen something only work in once place like this, and intermittently in others.

@karl_jones I have submitted the bug report, case 866471. Can you please help me out and just see if anything stands out to you? This is really bringing me to a halt with development.