Search Unity

Help Wanted Reflect - Sync current project without openning it with Reflect viewer

Discussion in 'Unity Reflect' started by VincentGoupil, Sep 18, 2020.

  1. VincentGoupil

    VincentGoupil

    Joined:
    Apr 1, 2019
    Posts:
    11
    Hi !

    I'm wondering if I could sync an already imported project in Unity ( imported with the Reflect window in Unity), without openning it with the Reflect viewer Prefab.
    I mean, by default If I deactivate the "Project Canvas" it deactivates the Sync Button. Is there a method to sync my current project without using the project openner? Basically, I need a custom viewer with only the sync system.
    I could look at the "Sync Manager" code to extract what I need (if it is possible) or is there a magic method to achieve my dream? ;)

    Vincent
     
    Last edited: Sep 23, 2020
  2. VincentGoupil

    VincentGoupil

    Joined:
    Apr 1, 2019
    Posts:
    11
    After taking the time to look at te code, I found the SyncManager class could be helpful.
    There is the Open method :

    Code (CSharp):
    1. public IEnumerator Open(Project project)
    I just do not understand how to get the correct Project instance for the parameter. Not sure what it means.

    Since the imported prefab (with the Reflect Window) got the component SyncPrefabBinding which gives me no clue about its project reference, how could I find the Project instance of my imported project?
     
  3. unity_WeHJyHh-zs3pog

    unity_WeHJyHh-zs3pog

    Unity Technologies

    Joined:
    Sep 3, 2019
    Posts:
    4
    Hello Vincent,
    the prefab of the first version of our viewer was meant to be slightly customized in terms of UI, or by adding new functionalities on top. What you are trying to achieve may require you to look at our latest version that aims for highly customizable workflow. You can now find the whole code available on this public github repo:
    https://github.com/Unity-Technologies/com.unity.reflect.viewer
     
  4. unity_WeHJyHh-zs3pog

    unity_WeHJyHh-zs3pog

    Unity Technologies

    Joined:
    Sep 3, 2019
    Posts:
    4
  5. VincentGoupil

    VincentGoupil

    Joined:
    Apr 1, 2019
    Posts:
    11
    Thank you for your anwser.

    I checked the new version, and there are some changes indeed. Unfortunately, I'm in front of a sprite problem.
    I took the project from github. Is it still in dev or i imported it wrong?
     

    Attached Files:

    Last edited: Oct 2, 2020
unityunity