• 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
Question by zharik86 · Jan 15, 2014 at 12:41 PM · androidscreenchangefullscreen

Android fullscreen change

Good afternoon. How to deliver in case of an application launch on Android the fullscreen=false mode; At me it is written so (the script is attached to the camera, the first scene after splash screen boots):

  void Start() {
   Screen.fullscreen = false;
  }

Unfortunately, it doesn't work (I checked on logs and I created GUI on the screen). But if I after pass into other scene and from it I return to the first (where I change the fullscreen mode as I wrote above), the mode of the screen changes. Prompt please how to deliver the fullscreen mode in false status in the first scene after its loading? (All t$$anonymous$$s becomes for device Android)

Comment

People who like this

0 Show 0
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

1 Reply

· Add your reply
  • Sort: 
avatar image

Answer by Sisso · Jan 15, 2014 at 01:17 PM

Probably you need to go into android plugins, customize your manifest and/or UnityPlayerActivity.

Tips:

Read plugin manual

http://docs.unity3d.com/Documentation/Manual/PluginsForAndroid.html

Search for tutorials:

Try to search for "unity3d customize android activity".

Read default activity:

Unity/Editor/Data/PlaybackEngines/androidplayer/src/com/unity3d/player/UnityPlayerNativeActivity.java

Comment

People who like this

0 Show 3 · 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
avatar image zharik86 · Jan 15, 2014 at 01:42 PM 0
Share

@Sisso Idea to create own plug-in, of course, the good. Finally it is necessary for me that the buttons back, home, etc. on the android were visible. The simplest method, it to deliver the fullscreen mode in false status. If to move my code to the Update function, everything works perfectly. Problem on initial stage to loading of application and as to correct it I don't know. Whether is it possible to make it as Start or Awake?

avatar image Sisso · Jan 16, 2014 at 10:59 AM 0
Share

Ok... sometime I read fast and lose some important comments, sorry. It works sometimes.

There is a important note in Screen.fullScreen help.

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

This property could have some crazy dependecy with frame? I think that Start and Awake are called before render the first time if they are already in scene. This could explain why it only work in Update.

Have you tried to change (http://docs.unity3d.com/Documentation/ScriptReference/PlayerSettings-defaultIsFullScreen.html) before build? The doc are not very helpfull but it could work.

avatar image zharik86 · Jan 16, 2014 at 07:21 PM 0
Share

@Sisso Unfortunately I tried different combinations. I have Unity 4.1.2. So can in later versions and there is for the Android fullscreen flag activation in ProjectSettings. But in this version isn't present. (And while I don't intend to transfer to higher Unity versions). When writing Screen.fullscreen=false as Start and project compiling for Windows no problems arise. Unfortunately such behavior is shown only for the Android of a platform. Probably, it is connected somehow to Splash screen. Option at me while only one - to transfer a code to the Update function and to check a screen mode. The first scene at me is an initial menu therefore there it is possible such to make.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

19 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 avatar image

Related Questions

Change screen Orientation when change scene 0 Answers

RenderTextures and FullScreen Quads 2 Answers

PDF417 Barcode reader for iOS and Android 0 Answers

How to make my game go full screen on android? (Google Pixel XL 2) 3 Answers

Can I customize the resolution window that appears at the start of my executable? 2 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