|
Post by Kejero on Feb 7, 2023 9:02:52 GMT
I noticed that if I'm executing the UpdateScreenSize coroutine, then enter a room with a zoom, those coroutines will fight.
I've added the following to ProCamera2D.cs
public void StopUpdateScreenSizeCoroutine()
{
if (_updateScreenSizeCoroutine != null)
StopCoroutine(_updateScreenSizeCoroutine);
} I've then added the call in ProCamera2DRooms.cs, in the TransitionToRoom() and ExitRoom() methods (in the same places where you stop the _transitionRoutine)
// Stop any previous transition
if (_transitionRoutine != null)
StopCoroutine(_transitionRoutine);
ProCamera2D.StopUpdateScreenSizeCoroutine(); // added This seems to work fine. Is there any reason this would be a bad idea? Otherwise I'd suggest this change is added to the code, since I can't imagine the behaviour as it is right now is ever desired?
I also tried to do the reverse: triggering a manual zoom during a "room zoom", but this seems not so straightforward...
|
|
|
Post by Luís Pedro Fonseca on Mar 13, 2023 22:46:10 GMT
Hi Kejero, sorry for the late reply and thank you very much for your suggestion. It makes a lot of sense and it was added to the package and will be part of the next release. Cheers
|
|