Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
4
Question by RyanZimmerman87 · Sep 05, 2013 at 03:23 AM · androidsplash screen

Is there any way to use Screen.SetResolution on Android without occasional screen flicker with Samsung Galaxy S4 Notification Panel?

I'm just about ready to give up on this problem. No matter what I try the Screen occasionally flickers after using:

Screen.SetResolution(1280, 720, true);

It's not a huge issue since I've set it up well enough now that it seems to only happen maybe like 1/5 times I start the game. But if it only happens occasionally is this just like a Unity or Android Bug?

I've also seen this occur in other professional apps with 100,000+ downloads on Android so is this just a problem with their system?

So one key thing to note about using Screen.SetResolution according to Unity documentation is:

"A resolution switch does not happen immediately; it will actually happen when the current frame is finished."

Makes sense but even with the following extreme solution I still get screen flickers on the Samsung Galaxy S4 but I've seemed to finally fix it on the Samsung Galaxy Nexus. I feel this is a bit rediculous to go to these extremes to begin with but I've created an empty scene with just one empty object and one script which is Scene(0). This new scene now plays before the Start Menu which should logically be the first (now takes longer to get to Start Screen).

This is the code I'm using in the empty scene before the Start Scene:

 public class ResolutionSettingsScript : MonoBehaviour 
 {
     
     int counter;
     
     void Awake()
     {
         //make a public static variable for something here?
         Screen.SetResolution(1280, 720, true);    
     }
     
     void Start()
     {
         counter = 0;
         //Application.LoadLevel("Start Menu");    
     }
     
     void Update()
     {
         ++ counter;
         
         if (counter > 1)
         {
             Application.LoadLevel("Start Menu");        
         }
     }
 }

Notice the excessive counter to make EXTRA sure that the Screen.SetResolution would have time to update before the Start Screen displays.

This seems to have finally 100% fixed the issue on the Galaxy Nexus. But on the S4 the Splash Screen may distort to a larger size and move to the bottom right of the screen before displaying the Start Menu. And sometimes the Start Screen appears to flicker or warp even though the resolution was set before even getting there...

So I'm about to just give up and say there is some kind of buggy nonsense going on with the S4. I'm obviously a bit OCD just for spending this much time on a minor issue but it's kinda annoying and looks very unprofessional to me.

So I think the problem may be that Samsung Galaxy is pure Android no bloatware manufacturer garbage?

However the S4 will display the "Notification Panel" that is "It is accessible from any menu or application." according to:

http://www.samsung.com/us/support/supportOwnersHowToGuidePopup.do?howto_guide_seq=7066≺d_ia_cd=N0000003↦_seq=48258

I beleive this is the reason why the S4 will always have occasional screen flicker even with extreme examples attempting to prevent it.

About 33% of the time it works fine. 33% of the time the Splash Screen Warps. 33% of the time the Title Menu flickers.

This still occurs even with "Landscape Left" set, and "Status Bar Hidden" in the build settings, and even with that extreme and undesirable script example above trying to prevent any possibility of Screen flicker...

So I guess I give up on it, I've wasted enough time thinking it was my own fault but now I think it's just an S4 problem. Who knows how many other phones also have this issue...

But my question is can this be fixed on Unity's side so it's really their bug or is it a Samsung Android thing?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image teexit · Jun 13, 2014 at 02:20 AM 0
Share

Hi, I have encounter same problem... $$anonymous$$aybe, it needs to modify low-level code. In XCode, I modify device setting to set resoulation. But, I do not have any ideal on Android.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Zeratu · Jun 04, 2015 at 12:04 PM

There is reason: Unity SDK has a bug when use Screen.SetResolution(),You should rewrite a .jar file ,and use unityPlayer.setScreenSize() Func in your new jar package.

there is a way to fix the problem.

https://github.com/zhukunqian/unity_scale_resolution

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Advice for various splash screens on Android 2 Answers

Set Android's Static Splash Image using API? 2 Answers

Powered by Unity screen still shows in Android Pro build 1 Answer

Scrolling Parallax flickers on some Android devices (2D) 1 Answer

Stuck on splash screen android 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges