Utility/DemoRecording.cs

Static helper that configures movie recording options for the Sandbox MovieMaker. It defines a DefaultMovieRecorderOptions handler that returns the provided MovieRecorderOptions with a filter that excludes prefab instances whose source starts with "prefabs/surface/".


using Sandbox.MovieMaker;

namespace Sandbox;

internal static class DemoRecording
{
	[DefaultMovieRecorderOptions]
	public static MovieRecorderOptions BuildMovieRecorderOptions( MovieRecorderOptions options )
	{
		return options
			.WithFilter( x => x.PrefabInstanceSource?.StartsWith( "prefabs/surface/" ) is not true );
	}
}