OhGeezCmon / VRC-AccessControl

VRChat Access Control Prefab
4 stars 0 forks source link

Breaks VRChat Client Simulator in Unity #3

Closed picbotvr closed 1 month ago

picbotvr commented 1 month ago

When testing a world with the prefab in Unity, the VRChat Client Simulator shows the Actions-Panel but choosing "Close Menu" freezes the mouse pointer and displays the message "Display 1 No cameras rendering".

I tried commenting out blocks of code in AccessControlManager.cs to try to isolate where the problem could be coming from but couldn't find any specific section of code that triggered the problem. The problem became intermittent with successive tests.

Commenting out GenerateButtons(); in the RegenerateUI() function reliably fixes the issue but I couldn't see anything in GenerateButtons that would trigger the problem.

Removing the prefab made the simulator work properly again. Re-adding the prefab reintroduced the problem.

picbotvr commented 1 month ago

more info ... This line specifically in GenerateButtons() triggers the problem

GameObject adminButtonObject = Object.Instantiate(adminButtonTemplate, adminGridContent.transform);

OhGeezCmon commented 1 month ago

Does the prefab have any issues within VRChat, or only in the Client Simulator? Can you try (please backup your project first!) deleting the "Library" folder and reloading Unity? Which version of Unity are you running?

picbotvr commented 1 month ago

It works fine in VRChat. The problem only occurs in Unity when running the Client Simulator.

I'm using Unity 2022.3.22f1, VRChat SDK-Worlds 3.5.2, VRChat SDK-Base 3.5.2, Package Resolver Tool 0.1.28

I'll try to delete and reload the library when I get a chance. It's not holding me up at this point ... I can work around the Client Simulator issue by disabling it during testing.

OhGeezCmon commented 1 month ago

Closing as there is a workaround, but will re-open if others experience this issue.