The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

DefaultPool fails to load my prefab once or twice then it works

2020-08-29 09:46:47

I updated to Unity 2020 from 19 because of an error that wouldn't let me open my project. I also removed all of the appdata to try and fix the problem. Since then, I have many issues but the most concerning one is that when I open the project and press play it fails to load my prefabs that are located in the root of a resources folder (that was working perfectly before). I try again and it fails again. Then usually around the 3rd time of trying it works perfectly fine.

How do I fix this?


2020-09-03 05:41:46

I can confirm i get this error from time to time as well. Normally fixes its self after pressing play a few times.

But this time im stuck in this state. Not sure what to do :(
Also running Unity 2020.1.3f1 (i started in 2020 so did not migrate, but still get error)

I Shelved my latest, reverted back to last stable, and then unshelved. Nothing changed, but error went away.

2020-09-12 21:05:11

I am also having this issue as well. I can confirm my Player prefab is in a Resources folder but it is under a custom folder structure (not the main Resources folder). The error happened only AFTER the upgrade to Unity 2020 and update to the September version of PUN.

2020-09-12 22:22:10

Status Update: I found a code implementation workaround/fix and implemented it... it works in my solution so far... player prefab is loaded. Solution here:

2020-09-16 15:48:22

@KathleenWest Thanks for posting that solution, I'm seeing the same error here ( new project, Unity 2020.1.5f ).

With the code to register the prefab, it works every time!

2020-10-27 05:26:13

I just changed the name of my Prefab and I changed the string used to Instantiate the prefab.

2020-11-12 04:45:48

Here is a video on how to fix this

2020-12-27 22:32:57

Hi everyone, Trying reimport the prefab also work.

2021-02-06 11:02:49

@preshu wrote: »

Hi everyone, Trying reimport the prefab also work.

That worked thanks

2021-08-15 02:42:09

@infogamerhub wrote: »

I just changed the name of my Prefab and I changed the string used to Instantiate the prefab.

This problem stuck me whole night...
I also got problem like you, after renamed my prefab, it happend

re-import prefab is not worked for me TOT

Then I read some posts like KathleenWest shared above
I found there are Resource cache exist, it seems like the problem is casued by cache not be cleared in some reason

so, when I put these in my code before where I call "PhotonNetwork.Instantiate"
it works (YEAH~!) :

( after let it run once time, you can remove it, because it has already cleared the cache for you )

Back to top