Getting information about when a region marker ends

I’m trying to use the region feature in FMOD for subtitles in my game.
The idea is that when the event plays, there is an event callback in unity that checks for EVENT_CALLBACK_TYPE.TIMELINE_MARKER.
When found I know I hit a marker and I can check it’s name to know I should start showing which subtitles (for example, the region is named “SUB: Hey this is a test” so I can use that information from the callback to show this on screen).

The issue is that the returned information in TIMELINE_MARKER_PROPERTIES only includes the name of the marker/region and its position on the timeline.
I’d love help getting either the length of the region or finding a different way of marking the region ending (callback event or anything of the sort).

Thank you very much for your time.


Unfortunately, there’s currently no way to get the length or end point of a timeline region at runtime. I can see how this might be useful, so I’ve added it to our internal feature/improvement tracker.

The simplest ways to get around this, depending on what exactly you’re doing, would be to encode the region’s duration/end point in the region name, or to place an additional marker at the end of the region so that you receive an EVENT_CALLBACK_TYPE.TIMELINE_MARKER callback when the timeline exits the region.

To simplify this a little, here’s a brief script that calculates and retrieves the end point of a region selected in the Event Editor. You can place it in your FMOD Studio install’s “scripts” folder in a .js file to run it inside Studio.{ name: "Get Timeline Region End",
	isEnabled: function() { var region = studio.window.editorCurrent(); return region && region.isOfExactType("LoopRegion"); },
	execute: function() {
		var region = studio.window.editorCurrent();
		var end = region.position + region.length;

From there, you could write end to the region’s name (, or create a new marker at end.

Thank you very much for the response! I’ll make do with this for the time being :slight_smile:

For future reference, is there a good way (public roadmap/update notification/etc) to follow a feature and know when it’s going to be publicly available?

No problem!

Unfortunately, we do not have a public-facing roadmap, and typically do not provide expected timeframes on when features will be publicly available. The best way to keep up with the latest changes when there’s a new release would be to subscribe to our newsletter, which you can do from the footer of any of our webpages besides the forum.