Error: Some objects were not cleaned up when closing the scene

Hey, guys. I’ve suddenly run into an error that keeps crashing Unity, and I can’t quite seem to find the root cause. Unity crashes when exiting playmode most of the time. On the rare occasion that it doesn’t crash, it spits out the following error.

“Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)
The following scene GameObjects were found:
*A list of various objects
**Assets/Enemies/EnemyManager.cs(208): PlayableGraph was not destroyed.”

*The objects in question are banked, so are neither created or destroyed in the scene. They are simply moved and set active. OnDisable they are moved back under their repository parent.

**Line 208 in the EnemyManager script has nothing to do with a playgraph. I’m using neither PlayGraph or OnDestroy commands in any of my scripts. Here’s the function that line 208 is in.

IEnumerator EnemySpawn(EnemyController controller, Transform enemy)
    {
        Transform warpIn = warpInHolder.GetChild(0);

        enemy.gameObject.SetActive(true);
        controller.isActive = false; //This is line 208
        controller.renderMesh.SetActive(false);
        controller.spawnMesh.SetActive(true);
        warpIn.position = enemy.position;
        warpIn.rotation = enemy.rotation;
        warpIn.transform.parent = player.planet;//

        warpIn.gameObject.SetActive(true);
        yield return new WaitForSeconds(1);
        warpIn.gameObject.SetActive(false);
        warpIn.transform.parent = warpInHolder;//

        controller.spawnMesh.SetActive(false);
        controller.renderMesh.SetActive(true);
        controller.isActive = true;
    }

I’m truly at a loss and it’s brought my project to a standstill, so suggestions would be appreciated.

I figured it out. Turns out I had an asset I had downloaded attached to the objects that was using OnDestroy. Not sure why Unity was pointing to a completely unrelated script, or why OnDestroy suddenly started causing issues since I’ve had that attached to these objects for weeks with no issues. Also, OnDestroy was not spawning any new objects. Making sure to explicitly disable that script when disabling the object seems to have cleared the issue.