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 Aezora · Jul 06, 2017 at 10:39 PM · camerabugdisplayculling mask

Camera only displaying one object even though culling mask is set to everything

Well it is basically as the title says. I am working on setting up a camera for each player. Currently, however I am only working with one player. Essentially the problem is when I instantiate the player and the player camera, everything seems to work, I switch to display 2 (which is what the camera is set on) and it only displays that character. I've tried moving the camera around in the hierarchy, (in the canvas, out of the canvas, as a child of the player object, etc.) but that doesn't seem to help. The camera is set to a position where it should see everything else. The camera is at -10 z, everything else is -1 z or above, and the objects appear to fit within the lines the camera sees. The other objects that should be displayed are buttons. This is a 2D game in case you were wondering.

On a slightly related note, I often run into bugs that seem to have no correlation with the code or anything else. For example, in one game I made the level generation would only go partway and then stop. There did not seem to be any reason. Eventually, I cut out the code, ran the game, ended the game, pasted back in the code and it worked just as it should. Why is this? Is it my computer that is having problems (it is pretty old...) or what?

Comment
Add comment · Show 4
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 DarkFang100 · Jul 06, 2017 at 10:41 PM 0
Share

I'm pretty sure your Culling $$anonymous$$ask has nothing to do with the bug. Don't quote me on that though.

avatar image Aezora DarkFang100 · Jul 06, 2017 at 11:13 PM 0
Share

I would probably agree, but if I were to do this on purpose I would use the culling mask, so I figured it might have something to do with it.

avatar image aldonaletto · Jul 06, 2017 at 11:55 PM 0
Share

What are the buttons? UI buttons (canvas), GUI buttons (OnGUI) or the legacy UI system (GUIText, GUITexture)?

avatar image Aezora aldonaletto · Jul 07, 2017 at 12:00 AM 0
Share

They are UI buttons (but lack the text component since I don't need it).

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Mergster · Jul 07, 2017 at 04:15 PM

If this is a 2d game, your Camera's z position MUST be set to -10.

Comment
Add comment · Show 9 · 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 Aezora · Jul 07, 2017 at 04:50 PM 0
Share

It is. I have changed it to see if it would help, but by default (in the preset) the z value is -10.

avatar image Mergster Aezora · Jul 07, 2017 at 05:20 PM 0
Share

Then your other camera settings must be wrong. Is the Near clipping planes set to 0.3? And could you provide a screenshot of your camera's inspector.

avatar image Aezora Mergster · Jul 07, 2017 at 05:28 PM 0
Share

The near clipping pane is set to .3 and the far to 1000. Here's the screenshot. Note that this is the instantiation of the camera and not the prefab, although it hasn't been altered from the prefab.

alt text

Show more comments

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

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

Related Questions

Camera culling problem 3D 0 Answers

Camera Change Bug 0 Answers

Raycasting with multiple cameras and displays 1 Answer

Broadcast rendered camera through networking. 1 Answer

Steam VR second untracked camera on display 2 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