I’ve recently released a demo of my game, and it was released as “offline” for PUN.
It seems the game works fine on most PCs, however, I’ve got messages from several users that the game is broken.
Below is one of the videos describing the issue:
If you watch it, you may see that the issue is related to the wrong spawning of objects: “Photon Instantiate” spawns things at the origin of the world which is “0,0,0”. (I used Photon Instantiate for every spawning of scene objects including the player.)
To describe this in detail, objects get spawned at the stored position inside the prefabs.
I have read a few posts dealing with a similar problem but they were all done under “online” mode. Mine is “offline”…!
I have spent days trying to fix this bug but haven’t yet come up with any clue. (The game worked for most of the PCs! But certain computers other than my country showed this issue.)
If anyone can help with this issue, I’ll put your name on our game’s special thanks list!
Have a wonderful day for everyone reading this thread
I would expect that PN.Instantiate() places the objects at the position you pass into Instantiate. Maybe it’s 0,0,0 in those cases?
If you can provide some way to reproduce it, we can look into this. Or logs from the clients?
Reach us via mail: developer@photonengine.com to provide whatever insight you have. Machines “in other countries” is usually not a problem.
I recently got a log file from one of the clients experiencing the issue, and I am attaching it here.
The lines that I found suspicious were these:
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/PhotonCryptoPlugin
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/PhotonCryptoPlugin.dll
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/PhotonCryptoPlugin
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/libPhotonCryptoPlugin
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/libPhotonCryptoPlugin.dll
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/libPhotonCryptoPlugin
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/PhotonSocketPlugin
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/PhotonSocketPlugin.dll
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/PhotonSocketPlugin
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/libPhotonSocketPlugin
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/libPhotonSocketPlugin.dll
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/libPhotonSocketPlugin
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/PhotonEncryptorPlugin
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/PhotonEncryptorPlugin.dll
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/PhotonEncryptorPlugin
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/libPhotonEncryptorPlugin
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/libPhotonEncryptorPlugin.dll
Fallback handler could not load library D:/GAMES/THE_HIGHRISE_3.6.2.2 DEMO_Dev(Log Available)/The Highrise_Data/Mono/libPhotonEncryptorPlugin
Would you take a look at the log?
And for anyone other than Tobias, would you let me know if you find any issue inside the log, too?
The part you quoted is harmless, actually. It is the attempt to load a native plugin for our lib. The code is fine with it not being present and falls back to a managed implementation. No harm done by this.
It is actually a bug in Unity to even log this at all (and it’s annoying because it does look like an issue).
I don’t see Photon related problems in the log.
I wonder what “Uploading Crash Report” means exactly and if there is a way to access it?
This looks as if it could cause issues with string encoding:
<color=#0099bc><b>DOTWEEN â–º </b></color>Target or field is missing/null () â–º
It could be related to Playmaker. Did you look up, if similar cases of this are known for it?
It looks as if could still be everything. Did you build a debug build?
Player2.txt has enless repetitions of found fsm to observe : 0 logs. Then it logs a lot of fsm’s it can’t find.
Is that the problem? I don’t use PlayMaker, so maybe someone in their community can help?
I don’t see exceptions or such and not a lot of PUN activity. It may be the state machines are not running and thus not instantiating what you’re missing…
Thanks again for helping me out on this issue, Tobias
found fsm to observe : 0 logs were found on the log with no bug, too, but I’ll have a look on them.
I’ve aslo left a post on the Playmaker forum as you suggested.
While I’m waiting for any reply, I will be changing the “Photon Instantiate” action to the simple “Create Object” action to see whether it makes a difference…!
No worries. I am glad you could find and work around this!
Sneaky.
Can I ask why and where you use ToString() on Vector3? You don’t send them over the network this way, do you?
You can include Vector3 in RPCs and OnPhotonSerializeView()…
ToString() was used to save the positions and rotations of the player and the items!
I loaded the data and turned them back to vector3 to instantiate them using Photon.
We use a 3rd party asset called “Smooth Sync” to sync real-time positions and rotations (except for the items as they barely move.) (+the asset uses Vector3 for OnPhotonSerializeView() I believe.)
But we do turn vector3 to String quite often for RPC because we use Playmaker for this function and it only supports the “String” value to send data…
So far, they haven’t caused much trouble yet so we will try to slowly convert the Playmaker functions to custom scripts after we release Early Access…!