cesium-unreal
cesium-unreal copied to clipboard
Expose CesiumSunSky date and time properties to Sequencer
See https://github.com/CesiumGS/cesium-unreal/issues/760 - Previously, you could not animate the date or time in Sequencer. This PR exposes CesiumSunSky's Solar Time, Day, Month, Year, and Time Zone parameters to Sequencer.

Note that currently, CesiumSunSky's UpdateSun function must be called every frame in order for the animation to reflect in the scene. The best way I could find around that was to add a Repeater Event Track on CesiumSunSky in the sequencer, then binding that event to UpdateSun. Steps to do that below, since I'm not sure where else to document them:
- Add CesiumSunSky to the Sequencer track
- Click the "+ Track" button and select Event>Repeater from the menu
- Double-click the new Event Track - it will create a new Sequence Director blueprint. Connect an Update Sun node to the event.

- Keyframe your animation
- To make sure it's working, right click on the event track and select Properties>Call In Editor.
Of course, there's a lot that could be improved here - it would be great if people didn't have to add the event track. But I imagine that would involve refactoring the SunSky so this is probably enough for now.
Thanks for the pull request @argallegos!
- :heavy_check_mark: Signed CLA found.
Reviewers, don't forget to make sure that:
- [ ] Cesium for Unreal Samples works.
There's actually a way to trigger UFUNCTIONs when sequencer-exposed variables are animated on a sequencer track:
https://docs.unrealengine.com/4.26/en-US/AnimatingObjects/Sequencer/HowTo/GameplayAnimBlending/#2-animationandcharacterblueprintsetup
It would make the most sense to implement this in C++ (the principles are the same, you just have to name the setter function have a parameter interp). I can make the changes if that's convenient.
Thanks @xuelongmu, that would be great!
Thanks again for your contribution @argallegos!
No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?
I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.
Hi, I tried adding the interp specifiers to the CesiumSunSky script in UE5 to expose the properties but does not reveal them in the sequencer. Are there other changes required to make this work with UE5?
Adding Interp should work, but only if you recompile the plugin. Unreal won't automatically pick up code changes that you make to an Engine plugin. You can try copying the plugin to your project's Plugins directory instead.
Great thanks for advice!
Hi... I'm a newb and so apologize for what is probably a stupid question: How does one find the CesiumSunSky script in UE5, find the interp code necessary to expose the parameter in the sequencer, add the interp code, and then recompile the plugin. Any help you can offer will be hugely appreciated!
If you've installed the plugin via the Epic Launcher, the code is usually found in C:\Program Files\Epic Games\UE_5.3\Engine\Plugins\Marketplace\CesiumForUnreal or similar for your UE version. The necessary change is this this PR; see the Files Changed tab. This is an old PR, though, so the files will have changed in the meantime, so you may have to adapt accordingly. The easiest way to recompile the plugin is to add it to your project's Plugins directory (copy the entire CesiumForUnreal directory there) and then Unreal will compile it on load, as long as your project is a C++ project. Convert a Blueprint-only to a C++ project by adding a C++ source file to it from the UE Editor. You'll need Visual Studio.
If you've installed the plugin via the Epic Launcher, the code is usually found in
C:\Program Files\Epic Games\UE_5.3\Engine\Plugins\Marketplace\CesiumForUnrealor similar for your UE version. The necessary change is this this PR; see the Files Changed tab. This is an old PR, though, so the files will have changed in the meantime, so you may have to adapt accordingly. The easiest way to recompile the plugin is to add it to your project's Plugins directory (copy the entireCesiumForUnrealdirectory there) and then Unreal will compile it on load, as long as your project is a C++ project. Convert a Blueprint-only to a C++ project by adding a C++ source file to it from the UE Editor. You'll need Visual Studio.
This is beyond me, could you elaborate with a step-by-step instruction on how to make this work in UE5.3? I'd very much appreciate your help with this.
No, we can't provide more detailed instructions than what I've already provided. If you have specific questions we may be able to answer them. Otherwise, you'll have to wait until this is incorporated into an official version of the plugin.
Thanks for the answers. My specific question is: Is this supposed to also work in UE 5.3.2? On the instructions, the screenshots are for 4.26. I have followed every step, copied the plugin folder, installed Visual Studio, created a project in C++, added the event repeater and connected the UpdateSun node, but nothing for time/date in the CesiumSunSky sequencer shows up.
As far as I know, the approach in this PR should work in 5.3.2 as well, but I haven't tried it. You will have to drag the CesiumSunSky Actor into the Sequencer, though, just like anything else you want to manipulate with the Sequencer. If that doesn't help, I'm afraid I don't know what the problem might be, sorry.
Maybe I missed something, but what is the way to implement this PR?
Maybe I missed something, but what is the way to implement this PR?
Sorry, I don't understand your question.