You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
686 B
C#
24 lines
686 B
C#
1 year ago
|
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;
|
||
|
}
|
||
|
}
|
||
|
}
|