ClientSim
                                
                                 ClientSim copied to clipboard
                                
                                    ClientSim copied to clipboard
                            
                            
                            
                        Fix broken Remove EditorOnly
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.
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅
I have read the CLA Document and I hereby sign the CLA
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
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)