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 dmtsui · Aug 15, 2011 at 11:59 PM · cameraarraymeshesocclusionfindobjectoftype

Return an array of meshes displayed on screen

Is there a way to return an array of gameobjects or meshes displayed on screen using camera or occlusionArea? I don't want everything, just what is actually being rendered on screen. Initially, I thought if I used OcclusionArea.FindObjectOfType or Camera.FindObjectOfType that it would return an array of gameobjects that are displayed on screen, but it just returned all the gameobjects I had loaded in the scene. The reason for this is when I generate mesh colliders from my FBX files I end up hitting a limit to the amount of colliders I can have in the scene. So what I want to do is be able to generate colliders on the fly based on the meshes that are displayed on screen and destroy them when I'm done. Any thoughts?

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

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by happyalex198 · Aug 16, 2011 at 12:10 AM

I think the problem might be that you are trying to use very complicated meshes for your colliders. Instead of using the full detail mesh from the FBX file, have you considered creating a very low polygon mesh to use as a collider. You could also create a "compound collider" out of primitives as discussed here http://unity3d.com/support/documentation/Components/class-BoxCollider.html. Using simple geometry for detecting collisions will probably also speed up performance significantly.

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 dmtsui · Aug 16, 2011 at 12:20 AM

Indeed, the meshes are very complex, but I have no control over that aspect. I need the colliders to match up because I'm using it for extreme precision. It would be much easier if this were for a game, I would optimize the actual geometry, but this is for an application I'm trying to develop and the only way around the limitations of the engine that I can think of is to generate a small portion of the mesh colliders when I need them and dispose of them afterwards. I'm not sure if that is even possible.

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 DaveA · Aug 16, 2011 at 12:25 AM 0
Share

Please don't answer an answer with an answer. use the 'comment' button

avatar image
0

Answer by DaveA · Aug 16, 2011 at 12:26 AM

You could find all objects with Renderers and check their isVisible flag http://unity3d.com/support/documentation/ScriptReference/Renderer-isVisible.html

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 dmtsui · Aug 16, 2011 at 12:31 AM 0
Share

Thank you! This looks really promising!

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Meshes were scrambled 0 Answers

Switching between 3 cameras doesn't work 1 Answer

How to make camera position relative to a specific target. 1 Answer

Texture 2D Arrays in Parallax Occlusion Mapping 0 Answers

Make an array of all visible objects 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