Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Help with Reflect Pipeline

Discussion in 'Unity Reflect' started by acandael, Oct 25, 2021.

  1. acandael

    acandael

    Joined:
    Apr 7, 2021
    Posts:
    74
    Hello,

    Sorry for the noob question here, but I'd like some help understanding how to customize Reflect Pipeline, or to be sure that I get it correctly.
    Basically, I want to develop a Reflect app, so I start from the git repo provided, then modify it. What I'd like to do is when I choose a model from the Reflect start menu, to change the ground material and replace it with some grass.

    So, I've seen/downloaded the Reflect Pipeline samples, and I get a very basic comprehension of what I'm supposed to do (i.e. insert a node where I want to add a custom operation), but my question is rather on where I should put that additional code.

    Let's say I go with something very similar to "Material Replacement Sample (Basic)". Am I supposed to just:
    • A) create 2 new files (like in the sample), and, well the Start() function is gonna execute, and that's how it's supposed to be, or
    • B) am I supposed to somehow insert my additional node into the original Reflect Pipeline? This would seem the way to go, since I want to work on that model I'm streaming from Reflect's start menu.
    And if it's option A), what happens? I mean, does it mean that 2 pipelines are going to execute in parallel or something?

    I hope my question is clear enough, sorry if it isn't!
    Thanks for any help,

    EDIT: I see there's
    Code (CSharp):
    1. public event Action beforeInitialize;
    in ReflectPipeline.cs, and it says we have to use that event to modify the pipeline.
    How/where do you use that event? Thank you!

    Arnaud.
     
    Last edited: Oct 25, 2021