You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using sharemesh mode, same effect will display errors at different scales.
I have made modifications to the UIParticleUpdater and UIParticle script, tested and fixed this issue. If deemed appropriate, I can consider submitting them to the repository.
The function is modified as follows:
UIParticleUpdater.Refresh
privatestaticvoidRefresh(){// Do not allow it to be called in the same frame.if(s_FrameCount== Time.frameCount)return;s_FrameCount= Time.frameCount;
s_PrimaryParentScales.Clear();// Simulate -> Primaryfor(vari=0;i< s_ActiveParticles.Count;i++){varuip= s_ActiveParticles[i];if(!uip||!uip.canvas ||!uip.isPrimary ||!s_UpdatedGroupIds.Add(uip.groupId))continue;varparentLossyScale= uip.transform.parent.lossyScale;
s_PrimaryParentScales.Add(uip.groupId, parentLossyScale);
uip.UpdateTransformScale(Vector3.one);
uip.UpdateRenderers();}// Simulate -> Othersfor(vari=0;i< s_ActiveParticles.Count;i++){varuip= s_ActiveParticles[i];if(!uip||!uip.canvas)continue;if(uip.useMeshSharing && s_PrimaryParentScales.TryGetValue(uip.groupId,outvar primaryScale)){varmyScale= uip.transform.parent.lossyScale;if((myScale.x <0.0001&& myScale.x >-0.0001f)||(myScale.y <0.0001&& myScale.y >-0.0001f)||(myScale.z <0.0001&& myScale.z >-0.0001f)){
uip.UpdateTransformScale(Vector3.one);}else{varratio=new Vector3(primaryScale.x / myScale.x, primaryScale.y / myScale.y, primaryScale.z / myScale.z);
uip.UpdateTransformScale(ratio);}}else{
uip.UpdateTransformScale(Vector3.one);}if(!uip.useMeshSharing){
uip.UpdateRenderers();}elseif(s_UpdatedGroupIds.Add(uip.groupId)){
s_UpdatedGroupIds.Add(uip.groupId);varparentLossyScale= uip.transform.parent.lossyScale;
s_PrimaryParentScales.Add(uip.groupId, parentLossyScale);
uip.UpdateRenderers();}}
s_UpdatedGroupIds.Clear();// Attractfor(vari=0;i< s_ActiveAttractors.Count;i++){
s_ActiveAttractors[i].Attract();}}
I have made some adjustments and committed changes based on your comments.
But, this fix may cause changes in the rendering of existing shared UIParticles.
Therefore, we should be cautious about merging this into the release stream.
If you're interested, please use the fix-333 branch for installation.
When using sharemesh mode, same effect will display errors at different scales.
I have made modifications to the UIParticleUpdater and UIParticle script, tested and fixed this issue. If deemed appropriate, I can consider submitting them to the repository.
The function is modified as follows:
UIParticleUpdater.Refresh
UIParticle.UpdateTransformScale
The text was updated successfully, but these errors were encountered: