Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.1.2] Remove EditorOnly on prefabs with Project settings Enter Play Mode Options enabled crashes ClientSim before starting #20

Open
CyanLaser opened this issue Apr 24, 2022 · 0 comments

Comments

@CyanLaser
Copy link

When using ClientSim's Remove EditorOnly feature, it will throw an exception when trying delete prefab children objects.

Requirements:

  1. Create a prefab that has a child object tagged as "EditorOnly" and place it in the scene
  2. Have Remove "EditorOnly" enabled in ClientSim settings
  3. In ProjectSettings/Editor, check "Enter Play Mode Options" and have "Reload Scene" unchecked

Observed:

  • ClientSim throws an error and fails to start

Expected:

  • ClientSim initializes and the child EditorOnly object is deleted without issue.

Full error text:

InvalidOperationException: Destroying a GameObject inside a Prefab instance is not allowed.
UnityEngine.Object.DestroyImmediate (UnityEngine.Object obj) (at <7d87237cea3743d093e22c5b98f74fba>:0)
VRC.SDK3.ClientSim.ClientSimRuntimeLoader.DestroyEditorOnly (VRC.SDK3.ClientSim.ClientSimSettings settings) (at Library/PackageCache/com.vrchat.clientsim@03a3097b91/Runtime/ClientSimRuntimeLoader.cs:112)
VRC.SDK3.ClientSim.ClientSimRuntimeLoader.StartClientSim (VRC.SDK3.ClientSim.ClientSimSettings settings, VRC.SDK3.ClientSim.IClientSimEventDispatcher eventDispatcher) (at Library/PackageCache/com.vrchat.clientsim@03a3097b91/Runtime/ClientSimRuntimeLoader.cs:89)
VRC.SDK3.ClientSim.ClientSimRuntimeLoader.OnBeforeSceneLoad () (at Library/PackageCache/com.vrchat.clientsim@03a3097b91/Runtime/ClientSimRuntimeLoader.cs:22)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant