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
0
Question by Sprawl · May 25, 2014 at 03:26 PM · camerarenderlayermultiple cameras

With multiples cameras, How to change what is rendered without using layers?

When having multiples cameras, I know It is possible to choose which layer each camera renders. However, I'd like a camera to render a specific gameobject without using layers for two reasons :

  1. I want to change which object is rendered at runtime, so it might be one instance of a prefab that appears multiple times.

  2. I'm already using layers for other purposes right now. So If I wanted to use layers, I couldn't just make one layer being rendered by the first camera and I'd have to make a double for each layer I currently have.

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by nesis · May 25, 2014 at 06:48 PM

Sounds like you just need to put your mesh on one layer and your collider on another. Decouple them by putting them on separate GameObjects, one parented to the other, or both parented to some other GameObject.

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 Sprawl · May 25, 2014 at 11:13 PM 0
Share

I could see that working. I'm gonna wait to see if someone has a better solution because it's gonna take some work since I didnt do this from the very start.

avatar image Sprawl · May 26, 2014 at 02:02 PM 0
Share

Alright, Although this doesn't really answer the question, it is a workaround so I will put it as answered for the time being.

avatar image
0

Answer by Jeff-Kesselman · May 25, 2014 at 06:34 PM

1 is easily fixed as you can reset the layer at run time within a script.

As for 2, you don't say what "other purposes" you are using layers for bit if its for anything other then controlling render or ray cast hit, its probably wrong.

Comment
Add comment · Show 1 · 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 Sprawl · May 25, 2014 at 06:39 PM 0
Share

its true that number 1 isnt much of an issue without problem 2.

I'm using the layers to ignore different raycasts I do. Like I said, I can just make new layers that will also have the same proprieties as the one before except that they'd be rendered on another camera. However, It seems more like a temporary fix than a good way to do it.

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

22 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

Related Questions

HDRP Camera weapon layer 1 Answer

Broadcast rendered camera through networking. 1 Answer

How to apply post processing only to objects drawn by that camera? 2 Answers

How do you get particles to be ignored by cameras? 1 Answer

Make Camera not render individual GameObject? 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