Hot answers tagged


You've added only two lines that are not in the default script template, and neither of them are correct. One of them is illegal and will not compile, the other is simply useless and does nothing related to what you're aiming to achieve. If you've really studied multiple tutorials and past Q&A threads and worked at this for days, I have to say that ...


Dictionary<RaySide, bool> newRel = new Dictionary<RaySide, bool>(); newRel = _relatives; This creates new dictionary and immediately replaces it with a reference to existing dictionary. You probably wanted to copy it, like this: Dictionary<RaySide, bool> newRel = new Dictionary<RaySide, bool>(_relatives);


You want to start your fade back to light coroutine after your fade to black loop has finished all of its work, not once in every iteration of the loop (ie. every frame the black fade is supposed to be updating). Move it outside the loop like so: private IEnumerator FadeToBlack() { Color originalColor = night.color; for (float t = 0.01f; t < ...

Only top voted, non community-wiki answers of a minimum length are eligible