Sub Cutscenes and Camera Fade

Slate Forums Support Sub Cutscenes and Camera Fade

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1777
    mografi_ben
    Participant

    Hi Gavalakis,

    I’ve run into a small issue that I’m hoping you can help me fix.

    I have a cutscene with a nested sub-cutscene that is shorter in length. I use a ScreenFader action to fade the screen to black during the parent cutscene. But when the end of the sub-cutscene is reached, the DirectorGUI attached to the Director Camera is disabled, so the screen fader gets turned off.

    I’m using Slate 1.72. I know that’s old and I’m sure you’ve fixed this in a more recent version of Slate, but I have to stick with my older version for this game.

    Could you just point in the right direction? Happy to make the fix myself I you tell me where to look,

    Thanks!

    Ben

    #1780
    Gavalakis
    Keymaster

    Hello,

    That is actually a non-wanted behaviour. Thanks for pointing this out. I will need to find a way around this, but the code in question, can be found in Cutscene.OnSampleEnded (and OnSampleStarted) method. OnSampleEnded, is called when a cutscene’s first or last frame is called (from within Sample method). Sample on the other hand is called the same both in editor and in runtime.

    Probably a quick fix would be to only call OnSampleEnded and OnSampleStarted if the cutscene is actively playing (isActive). This way, a subcutscene (which is not actually active) will not trigger this. The change would be to locate the OnSampleStarted and OnSampleEnded calls within the Ctuscene.Sample method and do this:

    Let me know if this change works for you.
    Thank you.

    Join us on Discord: https://discord.gg/97q2Rjh

    #1783
    mografi_ben
    Participant

    Ah, thanks!

    Perhaps it’d be better to edit the OnSampleEnded method itself and only disable the DirectorGUI if isActive? I presume we still want to RestoreLayersActive and all the other stuff in that method?

    What do you think?

    #1787
    Gavalakis
    Keymaster

    Hello and sorry for the late reply.
    This is also a valid alternative, depending on whether or not you want the sub-cutscene “active layer” to override the “master” cutscene.
    I think both ways will work fine though.

    Join us on Discord: https://discord.gg/97q2Rjh

    #1790
    mografi_ben
    Participant

    Well I’m not sure what I want to do there 🙂
    Can you give me a brief description of what the “active layer” is please?

    #1793
    Gavalakis
    Keymaster

    Hello again and sorry for the late reply.
    “Active Layers”, is a per-cutscene option (can be set in the inspector of the cutscene -> “Explicite Active Layers” ), which will enforce only certain layers (unity layers) to be visible for the duration of the cutscene. All gameobjects in the selected layers will be SetActive(true), while all non-selected will be SetActive(false). Once again, that is for the duration of the cutscene. As soon as the cutscene is done, the gameobject activeState will revert to the original.

    I hope that helps deciding the change you want to make 🙂

    Join us on Discord: https://discord.gg/97q2Rjh

    #1795
    mografi_ben
    Participant

    Ah, great. Yeah, I don’t use that feature, so I’ll just stick with your original suggestion.

    Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.