Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How to make a disabled GO be shown in a realtime reflection probe?

Discussion in 'General Graphics' started by Myrmidou, Jul 18, 2016.

  1. Myrmidou

    Myrmidou

    Joined:
    Jun 7, 2014
    Posts:
    30
    Hi there!

    Everything is basically in the title.

    I'm working on a project were a can hide & able multiple GO and I need the reflection probe to show all of their movements in realtime.

    Is it possible?

    Thanks!
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    If you can decide when it make sense to update you can set the reflection probe you can set the reflection probe type to Realtime and Refresh Mode to Via Scripting and call the update via code yourself.
    Or if you need it to update all the time you can set the mode to Real time and Refresh Mode to
    https://docs.unity3d.com/Manual/class-ReflectionProbe.html

    Keep in mind that updating reflection probes can be costly especial when it done every frame and when the resolution is high.

    Not totaly sure what you mean with:
     
  3. Myrmidou

    Myrmidou

    Joined:
    Jun 7, 2014
    Posts:
    30
    My project will not be really heavy so I think I can set the mode to realtime without high cost.

    I tried something like this and it seems to work:

    Have a gameobject "Cube", a camera & a reflection probe.
    I duplicated Cube as "CubeForProbe" and set it as Parent of Cube. Then, I set Cube's layer as "CubeLayer" and CubeForProbe's as "ForProbe". Finally, I set the culling mask of the camera and the the reflection probe so that the camera only see "CubeLayer" and the reflection probe only see "ForProbe".

    Now I can disable Cube and move it, it will still be visible and updated in the reflection probe.

    There's obviously a better way to do it but I really don't know how to do it, please let me know.