Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

LoadScene crashes Unity when JoyconManager.cs is being used #15

Open
jbccollins opened this issue Nov 14, 2018 · 1 comment
Open

LoadScene crashes Unity when JoyconManager.cs is being used #15

jbccollins opened this issue Nov 14, 2018 · 1 comment

Comments

@jbccollins
Copy link

Following the Unity instructions here:
https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.LoadSceneAsync.html
I copy pasted that code into here:
https://github.com/jbccollins/cornhole-simulator/blob/master/Assets/CrashingSceneController.cs

And that runs fine.
However, if I add the JoyconManager.cs script as a component to anything then the call to LoadScene will completely crash Unity. Any idea why that might be?

@OliJimbo
Copy link

OliJimbo commented Apr 30, 2019

I'm also having this problem - this is easily reproducible by duplicating the sample scene and adding SceneManager.LoadScene("scene2") to one of the button responses.

Has anyone found a work around for this?

EDIT

Narrowed this down a little.

The issue seems to be that if more than one Joycon manager object is in the project (even if it deactivated), Unity will crash when another is loaded. I've tried destroying with object.Destroy before changing scene, but that doesn't work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants