How do you sync particle effects over the multiplayer network? I need to make it so all players can see the particle effects emitted. I am converting my singleplayer game to multiplayer, and I am not familiar with most of the syntax because this is all new to me.
The particle effect is a laser that emits at a mouse click. Only the local player can see it.
Please explain as clearly as possible, Thanks.
Answer by ifurkend
Mar 18 at 03:39 AM
You generate your own uint for ParticleSystem.randomSeed and enforce this value on all players. Let's be frank, you gameplay should not rely on the precision of particle behavior because it is designed to be constantly randomized.
The gameplay does require precision of the particle emitted. I did not write the script or make the effect, just trying to make it work how it is.
Also, @ifurkend I dont't really understand your answer. How does ParticleSystem.randomSeed help sync the particle effect with all clients?
The default setting of particle system has its emission seed randomized by default (useAutoRandomSeed), if you see the particles emitted behave differently from different player, your only option is to write a script to generate a unified ParticleSystem.randomSeed for all players. If you still don't have a good idea, ask the question on general graphic forum with the "particles" tag. I still insist that you should never ever rely on particle system for precise gameplay mechanics, it is only for visual clue.
The problem isn't that the particles behave differently on each client, it is that I cannot see them at all. They are being emitted locally and I do not know how to make it so others are able to see them. I think the way I asked the question might have been confusing, so I hope that clears it up
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
147 People are following this question.
Instantiate Object in camera View
Unity 3D: actions on materials not executed in play mode but executed in project window
Is possible to use TTS for WebGl?
I don't understand how to use Car AI in Standard Assets.
Apk export and install on mobile success but after open it dosen't work and exit!