Unity-Technologies / usd-unity-sdk

Integration of Pixar's Universal Scene Description into Unity. UPDATE: This package has been superseded by our new bundle of USD packages. Please see README & link below for further details.
https://forum.unity.com/threads/new-openusd-packages-now-available.1524583/
Apache License 2.0
497 stars 74 forks source link

Restarting the project sometimes make the package not work anymore [USDU-461] #402

Open SoftwareMechanic opened 1 year ago

SoftwareMechanic commented 1 year ago

Hello!

Sometimes closing and reopening a Unity project make the package just not working anymore (maybe something saved in cache?), I can not import anymore USD files in Unity and whenever I try to open a stage reading a file from script I get errors:

so in the end I can not open and read USD file anymore

and a lot of similar logs all related to Materials

The files are correctly rendered in USD View and others tool. Before I faced this issue, I was working easily with the same files, both from editor menu (Import) and from script.

you can see that issue #401 has been created by me, I was just reporting issue post-import, but now I can not even import the same file: https://github.com/Unity-Technologies/usd-unity-sdk/files/12135108/usd_files.zip

Unity Version: 2022.3 (I faced same issue with .0 and .5f1)

In the projects I am testing this, there is also the NVIDIA Omniverse package installed, do you think this could cause conflicts?

I hope this can help you to improve this package :)

SoftwareMechanic commented 1 year ago

OK, I found that removing and reinstalling the packaged doesn't work. But I found that deleting the Library folder and reopening the project the package works again

vickycl commented 1 year ago

Hi @Baruchware, this is super interesting, thank you for reporting. A few follow up questions so we can investigate:

The NVIDIA Omniverse Connector is an intriguing point. It is something we haven't tested for compatibility with our package, so I will make a note to test this. In the meantime, it would be really interesting if you could test removing/ disabling that package and see if your issue arises again?

SoftwareMechanic commented 1 year ago

Hello and thank you for the answer !

I am using the last package version (the only one I tried) 3.0.0 - exp4 sadly I started using your package very recently so I can not compare this with experience of other versions, for the Materials folder I didn't added nothing, maybe it is just a remnant of tests made by developers ( I don't think this is creating the issue, but I wanted to share this info with you because I am not sure)

For the NVIDIA Omniverse Connector I will test a new project without it, and let you know ☺️

vickycl commented 1 year ago

Thank you for your answers, I will update our ticket. Please let us know whether or not you still see the issue without the Nvidia package :)

SoftwareMechanic commented 1 year ago

Hello @vickycl, I found that restarting a project multiple times (without the NVIDIA Omniverse connector installed in the project) it seems to works fine 😊

So maybe the issue is a sort of conflict between those 2 packages (maybe because of references to 'pxr' namespace?)

I am trying to use both because they have a very nice import which supports URP and HDRP, but considering this, I will wait for you to implement those pipelines. Also because I don't want to be forced to use the Omniverse Connector.

in the issue #401 we are already discussing about the usage of the branch which should support URP.

thank you!

EDIT: just a side note: if you want/need to use both (usd unity sdk and Omniverse connector) for each session of Unity (every time you open Unity3D) you have to reinstall both

codethegame18 commented 1 year ago

@vickycl @Baruchware I work on the NVIDIA Omniverse Unity Connector team, and we test compatibility with the Unity USD SDK (latest exp.4) package alongside the connector to ensure both packages work together.

Could you please provide more context on your operations that caused the incompatibility error reported above?

vickycl commented 1 year ago

Hi @codethegame18! Great to meet you, and I'm really happy to hear it's something being actively tested. I don't have the reproduction case that @Baruchware has mentioned, but if you are able to get to the bottom of it I would be glad to hear it and help out from our side. I (perhaps prematurely) added a disclaimer to the docs that the packages aren't compatible, so I will remove that before we release the new version of the package. (Edit: Accidentally closed the ticket, sorry!)

AnisAbDev commented 3 months ago

Hey, any update about this issue ?