Firstborn/Library/PackageCache/com.unity.timeline@1.7.1/Editor/Signals/SignalEmitterEditor.cs
Schaken-Mods b486678290 Library -Artifacts
Library -Artifacts
2023-03-28 12:24:16 -05:00

24 lines
686 B
C#

using UnityEngine;
using UnityEngine.Timeline;
namespace UnityEditor.Timeline.Signals
{
[CustomTimelineEditor(typeof(SignalEmitter))]
class SignalEmitterEditor : MarkerEditor
{
static readonly string MissingAssetError = L10n.Tr("No signal assigned");
public override MarkerDrawOptions GetMarkerOptions(IMarker marker)
{
var options = base.GetMarkerOptions(marker);
SignalEmitter emitter = (SignalEmitter)marker;
if (emitter.asset != null)
options.tooltip = emitter.asset.name;
else
options.errorText = MissingAssetError;
return options;
}
}
}