Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Samples from Reflect package is not usable due missing reference to Pipline namespace.

Discussion in 'Unity Reflect' started by garrido86, Nov 24, 2020.

  1. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    233
    As the title says it, make a fresh project and add the Unity Reflect package and click under samples on "Pipeline API" on "Import into Project" button.

    The compiler will complain that it can't find UnityEngine.Reflect.PipeLine.

    Actually I'm fresh into Reflect and I'm still having some difficulties finding my entry around the concepts and relevant APIs.

    Is the PipeLine samples the correct starting point or should I use the sample project on Github?
    Do I need to have Revit installed or can I just provide a revit file?
     
  2. DavidMenard

    DavidMenard

    Unity Technologies

    Joined:
    Jun 3, 2019
    Posts:
    121
    Hey Garrido86,
    Both the Samples and the sample project on Github are good places to start. I personally like the Github project, since it give much more functionality, but I still refer to the samples for quick cheat-sheets when it comes to the pipeline. Can I ask which versions of Unity / Reflect package you are using?
    You will need to have Revit installed to publish the model to a Reflect project.
     
    garrido86 likes this.
  3. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    233
    How does accessing a Reflect Project work once my App is deployed? Our end-users don't (and won't) have Unity accounts. Is there something like an API key that I have to integrate?

    I have been using Unity 2019.4.14f1 with the latest Reflect Package. So far setting up a fresh project with Reflect is for me not possible.
     
    Last edited: Nov 24, 2020
  4. DavidMenard

    DavidMenard

    Unity Technologies

    Joined:
    Jun 3, 2019
    Posts:
    121
    That's one limitation we have at the moment - they will need a Unity ID. We'll be working on supporting this type of workflow next year.
    Do you have your own Auth system, or are you using Okta, SSO, Windows Active Directory?
     
  5. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    233
    We just started our path on this journey to see how we can use AR and VR (we have many ideas) with our rich BIM data.

    For warming up with Reflect I'm working on simple marketing AR app where we augment some selected pages of our brochures with AR experiences - and here we wanted to directly use BIM data from Revit to present a building or something and the user can display different layers like pipes, wiring, and so on.

    But now as I understand, this all is technically not possible because the usage of Reflect is always hardly tied to a Unity Id?

    I suppose the only way to workaround this, is to use Reflect to load up the model once and then serialize the Gameobject graph so that I can use it without Reflect.
     
    Last edited: Nov 24, 2020
  6. DavidMenard

    DavidMenard

    Unity Technologies

    Joined:
    Jun 3, 2019
    Posts:
    121
    Ahhh I see what you're trying to do, thanks for the details!
    We have two workflows with Reflect:
    1- The main one is to customize the Reflect App to be used in a specific workflow. In this case, the app is independent of the model, and most of the functionality happens dynamically at runtime. In this case, the Reflect project provides a launching point to get going, but it's a full project by itself, and is actually what we publish on the app store
    2- The second use case is to use Reflect as an importer into the Unity Editor. In this use case, you'll develop AR Apps like any other and Reflect is really just a way to get your Data into Unity. You can also use tools like PiXYZ if you need to further optimize the data. But the key here is that the data is built into the app, and deterministic.

    I think in your case you'll want to look at scenario 2. You can use Reflect (or FBX, or PiXYZ) to import your model and get started from there, but no need to use any Reflect functionality at runtime! MARS might be a good thing to look at as well, great for quickly iterating over AR Apps :)
     
  7. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    233
    Thank you for the clarification and scenario 2 is what I was going by, loading the data in Editor to serialize it and then load it at runtime without having to connect with Reflect server(?).

    I actually have experience with PiXYZ on productive apps and its a great tool but as you said yourself, Reflect retains all the meta data and makes the BIM model "workable" so to speak. So again, glad to know that scenario 2 is possible. Is there by the way a build-in function to serialize the Gameobject composition from a loaded Revit model?

    And yeah, the issue about not being able to access the UnityEngine.Reflect.PipeLine namespace in a fresh project is still there, so if you could at least verify that on your end as well, that would be helpful.
     
  8. DavidMenard

    DavidMenard

    Unity Technologies

    Joined:
    Jun 3, 2019
    Posts:
    121
    Hey,
    Yes, you can import your models directly into the editor through the Reflect window, and it will simply create a Prefab for your model.
    Can I ask which version of the Reflect package you are using? It should be 1.3.0-preview.102 at the moment, and we'll be updating it in the next few days/weeks to 2.0.x
     
    garrido86 likes this.
  9. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    233
    I have used 1.3.0-preview.104, will the API/SDK change a lot with 2.0?
     
  10. DavidMenard

    DavidMenard

    Unity Technologies

    Joined:
    Jun 3, 2019
    Posts:
    121
    No, the API will remain compatible and won't change much. We made most of the big changes in 1.3.0 :) Can you try with 1.3.0-preview.102 see if the problem is still there?
     
  11. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    233
    I downgraded to 1.3.0-preview.102 and I still can't access UnityEngine.Reflect.PipeLine.
    This with a fresh project and nothing else added.
    As a workaround I could use the sample project from Github as a starting point and then remove everything to a clean state, but on the other hand it should work from the get go without any workarounds... so yeah a bit strange.

    Btw can I use the standard/legacy rendering pipeline or is it all optimized for URP?
     
  12. i_am_olo

    i_am_olo

    Unity Technologies

    Joined:
    Dec 9, 2014
    Posts:
    10
    if you are using 1.3.0-preview.102 the Pipeline API requires a #define in the Player Settings (see below) Screen Shot 2020-11-26 at 12.16.08 PM.png

    from 2.0.0 on, the Pipeline API is on by default.

    Hope this helps,
     
    garrido86 likes this.
  13. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    233
    Thank you, this solved the issue and I look forward the 2.0.0 release :)
     
    DavidMenard and i_am_olo like this.
  14. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    233
    I can confirm that the new 2.0.0 preview does indeed not require anymore to define the PIPELINE_API symbol.
     
    DavidMenard likes this.