GlobalGameJame/Library/PackageCache/com.unity.timeline@1.2.10/Editor/Signals/SignalEmitterEditor.cs
JonatanRek bea2dce063 Initial
test
2020-01-31 16:10:04 +01:00

24 lines
718 B
C#

using UnityEngine;
using UnityEngine.Timeline;
namespace UnityEditor.Timeline.Signals
{
[CustomTimelineEditor(typeof(SignalEmitter))]
class SignalEmitterEditor : MarkerEditor
{
static readonly string MissingAssetError = LocalizationDatabase.GetLocalizedString("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;
}
}
}