Hi, I'm making a 2D game and have a question about using Timeline and cameras.
(Unity 2022.3.3f1 / AC 1.81.6)
In my project, I used the AC-Main Camera track in Timeline to blend between two cameras, GameCamera2D_A and GameCamera2D_B. My PlayableDirector's Wrap Mode is set to Hold.
After the Timeline finishes, I'm trying to switch from GameCamera2D_B to NavCam1 using the Camera: Switch
action, but it doesn't seem to work. The game window still shows the view from GameCamera2D_B, even though the Main Camera's inspector says it's NavCam1. (It's always been NavCam1.)
Is there an alternate way to switch cameras when the Timeline's Wrap Mode is Hold, or did I miss a setup step? Any advice would be greatly appreciated. Thank you!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Is the Wrap mode a factor, in that setting it to None prevents the issue?
Check that the Camera component itself isn't enabled at runtime - this should be disabled, just as with any other GameCamera outside of Timeline.
Check also that the Track doesn't have Sets Camera After Running checked.
If it's the Hold property that's doing it, try adding another clip to the Timeline track that switches it back to the NavCam just before the Timeline ends.
Thanks for getting back to me so quickly.
Yes, setting the Wrap Mode to 'None' does fix the issue.
I've checked the camera components for NavCam1 and other GameCamera2Ds, and they are all disabled.
Yep, the Track has 'Set Camera After Running' unchecked.
Since I have a sequence of ActionLists that run after the Timeline (which uses 'Hold' as the Wrap Mode), I ended up creating another Timeline with just an AC - Main Camera Track, and set its Wrap Mode to 'Hold.' I placed this new Timeline at the end of the ActionLists, and it seems to be working for now.
That said, I wonder if there might be a more efficient way to handle this—I'm open to any suggestions!