readyplayerme / rpm-unity-sdk-core

This Module contains all the core functionality required for using Ready Player Me avatars in Unity, including avatar loading and creation
MIT License
97 stars 33 forks source link

Start marked private in AvatarLoadingExample.cs #239

Closed ibytergj closed 9 months ago

ibytergj commented 9 months ago

Describe the bug Start() should not be marked private in the AvatarLoadingExample.cs

To Reproduce Steps to reproduce the behavior:

  1. Try to run AvatarLoadingExample scene. Nothing shows up.
  2. Try to debug AvatarLoadingExample.cs - no break point can be set.
  3. Try to remove and add back the AvatarLoadingExample.cs script to the gameobject. It is impossible.

Expected behavior Change private void Start() to public void Start(). Everything starts working.

Desktop (please complete the following information):

ibytergj commented 9 months ago

So the issue is not that it is marked private but until I marked it public I could not see the

[SerializeField] [Tooltip("Set this to the URL or shortcode of the Ready Player Me Avatar you want to load.")]
private string avatarUrl = "https://models.readyplayer.me/638df693d72bffc6fa17943c.glb";

in the editor nor set a breakpoint.

HarrisonHough commented 9 months ago

This is not a bug, the Start function does not need to be public. I was not able to replicate your issue. As for the breakpoint, you generally can't place a breakpoint in C# on a variable the same way you place a breakpoint on a specific line of code. I would suggest putting your breakpoints inside functions on lines of code you specifically want to debug. I am closing this issue, but if you have any other issues feel free to let us know.

ibytergj commented 9 months ago

Hi Harrison, sorry for miscommunicating the issue but I’still believe there’s a problem as I couldn’t put a break point on any code in that script. Changing to public was a workaround that seemed to help the situation. If you check, you should notice that the avatar URL, which should be visible in the editor is not there as well.

Will try to repro in a brand new project just to be sure.