livekit-examples / unity-webgl-demo

Demo for LiveKit Unity SDK
https://unity.livekit.io
30 stars 10 forks source link

3 error on webgl #4

Open michaellu88 opened 2 years ago

michaellu88 commented 2 years ago

i have imported the demo project and open the unity-project folder. switch to Webgl.

i got this 3 error

EntryPointNotFoundException: InitCopyPaste assembly: type: member:(null) CopyPaste.Init () (at Assets/Scripts/CopyPaste.cs:16)

EntryPointNotFoundException: InitCopyPaste assembly: type: member:(null) CopyPaste.Init () (at Assets/Samples/LiveKit WebGL SDK/1.2.3/Example/ExampleRoom/CopyPaste.cs:16)

NullReferenceException: Object reference not set to an instance of an object JoinHandler.Start () (at Assets/Scripts/JoinHandler.cs:31)

pls help

tq

michaellu88 commented 2 years ago

i believe the nullreferenceexception is the missing Camera Projection in JoinHandler script. may i know where the file? tq

theomonnom commented 2 years ago

Hey, this repository is a Unity Project itself. You don't need to import the samples from client-sdk-unity-web

adamroszyk commented 1 year ago

This is still an open issue- Camera Projection field is missing in the JoinHandler object on the JoinScene.

davidzhao commented 1 year ago

@adamroszyk which Unity version are you seeing this with? Can you provide any repro steps?

adamroszyk commented 1 year ago
  1. I download zip file from https://github.com/livekit/client-unity-demo
  2. Started unity-project from within the folder with unity 2021.3.17f1
  3. I’m getting package Manager Error -shader graph in 12.1.7 isn’t available
  4. The project opens up, I’m upgrading the shader graph to 12.1.9 to get rid of the error
  5. I’m clearing the console- there’re multiple errors related to incorrectly loaded textures and 3d files
  6. I’m Switching the platform to WebGL
  7. I noticed that in the JoinHandler object Projection field is set to None- that looks suspicious..
  8. I build the application
  9. I publish the application
  10. I’m getting a null reference error in the browser
  11. when I test in the editor I’m also getting NRE: NullReferenceException: Object reference not set to an instance of an object JoinHandler.Start () (at Assets/Scripts/JoinHandler.cs:33)
davidzhao commented 1 year ago

Thank you for the steps. reopened.

theomonnom commented 1 year ago

Hey, I have updated the ShaderGraph version on the main branch. On the JoinHandler, by default, the Projection field is correctly set to the one inside the scene. I'm not sure I understand why it's not defined in your case. You can easily fix it by selecting the correct game object like the screenshot below

Screenshot 2023-04-09 at 11 30 26 PM