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 _watcher_ · Jun 02, 2016 at 12:33 PM · rendererfalseisvisible

Renderer.isVisible = FALSE on app start, TRUE on following frames?

Render.isVisible seems to behave unreliably on app start. Is this expected? Example:

1) Create empty scene

2) Paste this on GameObject that is in camera view, and Run:

 public class RendererIsVisibleTest : MonoBehaviour
 {
     private Renderer rend;
 
     // Use this for initialization
     void Start ()
     {
         rend = GetComponent<Renderer>();
         Debug.Log(rend.isVisible);
     }
     
     // Update is called once per frame
     void Update ()
     {
         Debug.Log(rend.isVisible);
     }
 }

Result:

False

False

False

True (always True from now on)

So we can see that on Start the result traces False, although the object with the renderer is in view on start (both in game camera view and Editor view). Also next couple of frames trace False, before we get consistent True traces. In another project i have, Start traces False, but first Update cycle already traces True - very inconsistent.

Is this expected behavior? Bug? I could wait some time and start tracing then (im expecting True as first trace result), but is this preferred implementation? How long to wait, since sometimes it takes 3 frames to get proper value, sometimes just 1 frame?

This delayed execution seems like a bad implementation, and Unity's behavior seems like a bug to me. Please post your suggestions / ideas. I need to get TRUE as first trace and id (preferably) like to use Renderer.isVisible as it fits in my current system.

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

0 Replies

· Add your reply
  • Sort: 

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

43 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

Related Questions

Render.IsVisible returning false for one frame 2 Answers

Render.IsVisible always show visible even when off camera. 1 Answer

MeshRenderer Scirpt help 1 Answer

renderer.enabled false not working 1 Answer

check if children are visible, if not destroy parent? 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