In the 2D Combat Unity RPG course I occasionally receive an error: “Coroutine couldn’t be started because the game object ‘Canopy’ is inactive!”. I think something is happening because the canopy becomes transparent. The error occurs when I am transitioning between scenes 1 & 2. My solution was to scale back the canopy so that it doesn’t become active/inactive from the player moving beneath it & this seems to work but wondering if there is another solution?
Hi yummyBacon,
I apologise that this question was missed as it appears that the tagging of the course and lecture did not work on this occasion and so it did not come up on my daily checks.
I wonder if we solve this in a later lecture as its a condition based on if the scene has loaded and the canopy layer has not fully loaded in by the time that the player is loaded.
I think its possible to solve by making sure that the player postion when loading in between scenes is not under the canopy layer as this would mean it woudnt need to fade the canopy at this point.
Hope you solved the issue and apologies again for missing the question
The canopy shouldn’t be inactive at, we should just be changing it’s alpha.
Paste in the text of your TransparentDetection.cs script and we’ll take a look.
- Forum User Guides : How to apply code formatting within your post