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

Fix broken Remove EditorOnly #67

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mfmfuyu
Copy link

@mfmfuyu mfmfuyu commented Jan 17, 2023

Remove "Editor Only" is not working correctly currently.
GetRootGameObjects seems to return an empty result before the scene is loaded.
By doing this, Removing GameObject processing is not working correctly.

CyanEmu is using AfterSceneLoad, but ClientSim is using BeforeSceneLoad.
So, I did use AfterSceneLoad like as CyanEmu.
The code is a copy from here and here.

I tested these changes in my own 2 projects.
It seems working correctly with Remove EditorOnly and other functions.
But I think need more tests, If dependent it's BeforeSceneLoad.

@github-actions
Copy link

github-actions bot commented Jan 17, 2023

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@mfmfuyu
Copy link
Author

mfmfuyu commented Jan 17, 2023

I have read the CLA Document and I hereby sign the CLA

@mfmfuyu
Copy link
Author

mfmfuyu commented Jan 19, 2023

Sorry for my lack of research.
I could'nt find this related issue when I created this PR.
This issue is already created on #33

@mahuvrc
Copy link

mahuvrc commented Apr 4, 2023

I've tried this and it appears to break the functionality of enter and exit station events in ClientSim. It may also break some other things but that was the first thing I noticed. (Edit: it also breaks pickups)

Changing it by moving just the DeleteEditorOnly code to after scene load doesn't appear to cause any issues so that's what I am going with for now on my end and I'll contribute a PR after I fix the integration tests. (Changing my editor settings to enable Enter Playmode Settings is not a workaround as this causes ClientSim to crash in all my projects, which is issue #20)

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

Successfully merging this pull request may close these issues.

None yet

3 participants