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 /
avatar image
0
Question by KnightRiderGuy · Dec 05, 2015 at 05:04 AM · c#camerauicanvasswitching

Scene Is Missing A Full Screen Camera?

OK I'm using this method here for switching cameras from one UI canvas to another. Switching Cameras method UI C#

Only when I switch to the 2nd camera on the 2nd canvas I get this: What the 2nd switched camera gets?

screen-shot-2015-12-04-at-110000-pm.png (25.6 kB)
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 KnightRiderGuy · Dec 05, 2015 at 12:47 PM 0
Share

It turns out that my camera was accidentally made a child of the canvas. But even when I removed it from the canvas I still get only a black screen on camera switch?

Both canvases are set as camera screen space and have the correct cameras assigned to them? What could be wrong? Anyone?

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Maulwurfmann · Feb 21, 2016 at 04:27 PM

Check if the "Viewport Rect" of your Camera is setup correctly: X:0 Y:0 W:1 H:1

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

Answer by VengadoraVG · Mar 21, 2016 at 09:55 AM

It didn't work for me! I could not fix it in any way...

I ended up setting up the main camera's transform position and rotation to the "camera i wanted to switch to"'s position and rotation :(

 void Start () {
    // ...
    _originalCameraRotation = _mainCamera.transform.rotation;
    _originalCameraPosition = _mainCamera.transform.position;
    // ...
 }

 void SwitchToCamera(Camera c) {
   _mainCamera.transform.position = c.transform.position;
   _mainCamera.transform.rotation = c.transform.rotation;
 }

 void ReturnToMainCamera () {
   _mainCamera.transform.position = _originalCameraPosition;
   _mainCamera.transform.rotation= _originalCameraRotation;
 }


Comment
Add comment · Show 2 · 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 Fredex8 · Mar 21, 2016 at 06:38 PM 0
Share

Just tag every camera you are trying to switch to/from as $$anonymous$$ainCamera then use SetActive to enable and disable whichever camera you want.

avatar image aaonurdemir · Aug 23, 2016 at 03:03 PM 0
Share

Run your game in the editor. Check the scene elements in the Hierarchy. If there is no camera whose viewport width and height (both) is set to 1, Unity displays this error.

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

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

Related Questions

Is there a way to make a Texture2D screenshot that ignores the canvas? 3 Answers

UI Minimap 0 Answers

canvas screen space camera rotation issue 0 Answers

Stop character from moving out of camera sight 1 Answer

Cavnas-based prefabs break their positions. 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