Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New drawcall added, cannot be batched #320

Open
nomedy opened this issue Jul 23, 2024 · 13 comments
Open

New drawcall added, cannot be batched #320

nomedy opened this issue Jul 23, 2024 · 13 comments
Assignees
Labels
question Further information is requested

Comments

@nomedy
Copy link

nomedy commented Jul 23, 2024

There is a particle using UIParticle between the two pictures. The three components do not block each other. The two pictures use the same atlas. Why are there three DrawCalls displayed in the FrameDebug panel?
VideoLobby - app_goldslots_unity_ios - iOS - Unity 2019 4 36f1  PREVIEW PACKAGES IN USE   Metal  Unity, Today at 18 36 38
VideoLobby - app_goldslots_unity_ios - iOS - Unity 2019 4 36f1  PREVIEW PACKAGES IN USE   Metal  Unity, Today at 18 36 42

@nomedy nomedy added the question Further information is requested label Jul 23, 2024
@mob-sakai
Copy link
Owner

Thank you for your reporting!
Could you please attach a minimal project (included Assets, Packages and ProjectSettings directories) that reproduces the issue?

repos

@mob-sakai
Copy link
Owner

@nomedy
Is Sprite Atlas enabled in the editor?

@nomedy
Copy link
Author

nomedy commented Jul 24, 2024

I have of course activated "Always Enabled" for Sprite Packer. The demo shows that there are still three drawcalls.
particleDemo.zip

pic

@mob-sakai
Copy link
Owner

@nomedy
Try latest version

@nomedy
Copy link
Author

nomedy commented Jul 31, 2024

When I upgraded to the latest version, the IgnoreCanvasScaler variable in the UIParticle class disappeared. What should I do if it did the scaling in Transform when it was not checked originally? @mob-sakai

@mob-sakai mob-sakai reopened this Jul 31, 2024
@mob-sakai
Copy link
Owner

Oh, sure...
I had missed that case.

@nomedy
Copy link
Author

nomedy commented Aug 2, 2024

I need to update to the latest version urgently. How long will it take to fix this problem?

@mob-sakai
Copy link
Owner

Perhaps the work needed is UIParicle.autoScalingMode=None

@mob-sakai
Copy link
Owner

Or try using a package with the default value of AutoScalingMode changed to None.
com.coffee.ui-particle-4.9.0.tgz

https://github.com/mob-sakai/ParticleEffectForUGUI/blob/main/Runtime/UIParticle.cs#L108

private AutoScalingMode m_AutoScalingMode = AutoScalingMode.Transform;
->
private AutoScalingMode m_AutoScalingMode = AutoScalingMode.None;

Install a UPM package from a local tarball file

@mob-sakai
Copy link
Owner

@nomedy

@nomedy
Copy link
Author

nomedy commented Aug 6, 2024

It is not an ideal solution. There will be many changes. Different particles may have different properties.

@mob-sakai
Copy link
Owner

Does AutoScalingMode= None fix your problem?

@nomedy
Copy link
Author

nomedy commented Aug 9, 2024

This method can certainly solve the problem, but it is troublesome to deal with our projects one by one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants