Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
This question was closed Nov 10, 2015 at 08:30 AM by NGC6543 for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by NGC6543 · Nov 11, 2015 at 01:02 AM · cameraiosdisplays

iOS External Display not working

Hi, I'm doing a project that needs external display use on iOS device. I saw that unity's Display.displays is avaliable for iOS, and it DID work on one test project. But the same code just don't work on the other project, and I tried everything to find the problem but no solution..

 int currentDisplayCount=0;
 IEnumerator CheckExternalDisplays(){
         while(true){
             if(currentDisplayCount != Display.displays.Length){
                 Debug.Log ("# of External Displays : " + Display.displays.Length);
                 if(Display.displays.Length > 1){
                     
                     Debug.Log ("Disp1 SystemWidth, SystemHeight : "
                                + Display.displays[1].systemWidth +"x"+Display.displays[1].systemHeight);
                     Display.displays[1].Activate();
                     Display.displays[1].SetRenderingResolution(1920, 1080);
                     
                     Debug.Log ("Set to FHD. \nDisp1 SystemWidth, SystemHeight : "
                                + Display.displays[1].systemWidth +"x"+Display.displays[1].systemHeight);
                     Debug.Log ("Disp1 Resolution : "+Display.displays[1].renderingWidth+"x"+Display.displays[1].renderingHeight);
 
                     for(int i=0 ; i<cams.Length ; i++){
                         cams[i].SetTargetBuffers(Display.displays[1].colorBuffer, Display.displays[1].depthBuffer);
                     }
                 }else{
                     Debug.Log("Disp0 Resolution : " + Display.displays[0].renderingWidth+"x"+Display.displays[0].renderingHeight);
                     for(int i=0 ; i<cams.Length ; i++){
                         cams[i].SetTargetBuffers(Display.displays[0].colorBuffer, Display.displays[0].depthBuffer);
                     }
                 }
                 currentDisplayCount = Display.displays.Length;
             }
             yield return new WaitForSeconds(1f);
         }
     }

this ienumerator periodically checks for external display. when it detects there are more than one display available then it activates the first external display(Display.displays[1]), set its resolution to FHD(which is known display), then changes the cameras' targetbuffers to that display.

and the odd thing is, when the code sets the external displays resolution to FHD, it in fact changes my devices resolution(iPhone6) to that, making the device screen cropped. And the external display shows nothing. The opposite had happened with test project. Black Device display, FHD rendering on external display.

I checked everything I can think of, compare the build settings, etc... but nothing.

Can you guys check this for me?

Comment
Add comment · Show 2
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 NGC6543 · Nov 10, 2015 at 06:20 AM 0
Share

further research shows that the device resolution stays the same. only the cameras that are set to draw on the external display are affected. Those cameras' "SetTargetBuffers()" is not properly working. when the external display is plugged in, those cameras' drawing resolution( each camera's "Viewport Rect" property) is changed, but the targetbuffers are not changed. Hence it looks like the screen is "Cropped"

avatar image NGC6543 · Nov 10, 2015 at 08:31 AM 0
Share

Finally got the problem. I was using FishEye effect from standard assets to those camera, and that script causes the problem. I have to dig more to modify the script..

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

WebCamTexture zoomed in on iPad Pro 1 Answer

how to request location , camera permission during run time ? 0 Answers

iOS + Android: Camera Feed in Unity 0 Answers

how to get 4:3 non cropped WebCamTexture in iOS 0 Answers

iOS front facing camera 1 Answer


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