UCL-VR / ubiq

Other
98 stars 34 forks source link

Errors stop building to APK #48

Closed cz2011301070 closed 7 months ago

cz2011301070 commented 7 months ago

Here is the steps that I did to encouter the errors:

  1. Clone the code
  2. open with unity hub and download the recommended unity version
  3. swith to the andriod platform
  4. player settings->XR plugin management_> tickle oculus
  5. Open the Demo scene in the samples->Demo(XR) folder
  6. go to build setting, add open scene, tickle the Demo scene
  7. click on build
  8. name the apk
  9. after 3-5 seconds, the console showed errors and the build task canceled image

I also tested the release version and had same problem

cz2011301070 commented 7 months ago

I figured out the problem. It was caused by the .asmdef files.

I checked the unity assembly definition document here.

The problem is caused by the editor mode code in:

  1. Assests->Samples->Demo(XRI)->DemoAssets->Scripts->Editor
  2. Assets->Runtime->Scenes->Editor
  3. Assets->Runtime->ExampleAvatar->Editor

To solve the problem, follow the following steps show in the unity document: image

  1. I create Assembly Definition Reference assets in Assets->Runtime->Scenes->Editor and Assets->Runtime->ExampleAvatar->Editor. And refered to the Ubiq.Editor which stored in Assets->Editor image

  2. Since under Assests->Samples->Demo(XRI)->DemoAssets->Scripts->Editor there already be the Ubiq.Samples.Demo.Editor.asmdef file, I just unchekced the Anyplatform and only selected the Editor image

After making the above changes, I can build the APK now.

Although this works, I still recommend the project members to fix this problem in next version.

sebjf commented 7 months ago

Thank you @cz2011301070 for the bug report!

@bnco-dev says that there will be mini-release soon to address this, and there are also fixes incoming for Q3 builds with Vulkan.

bnco-dev commented 7 months ago

Thanks @cz2011301070 and @sebjf. Addressed in f769c7114832ad756b3fdca10c3e52a6a1127c2e. Fix in v1.0.0-pre.2.