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.
CrowdControl/Assets/3rd/Plugins/UltEvents/Misc/Benchmarks/UnityEventBenchmark.cs

36 lines
1.2 KiB
C#

// UltEvents // Copyright 2020 Kybernetik //
#pragma warning disable CS0649 // Field is never assigned to, and will always have its default value.
#if UNITY_EDITOR
using UnityEngine;
using UnityEngine.Events;
namespace UltEvents.Benchmarks
{
/// <summary>[Editor-Only]
/// A simple performance test which invokes a <see cref="UnityEvent"/>.
/// </summary>
[AddComponentMenu("")]// Don't show in the Add Component menu. You need to drag this script onto a prefab manually.
[HelpURL(UltEventUtils.APIDocumentationURL + "/Behchmarks/UnityEventBenchmark")]
public sealed class UnityEventBenchmark : EventBenchmarkBase
{
/************************************************************************************************************************/
[SerializeField]
private UnityEvent _Event;
/************************************************************************************************************************/
/// <summary>Called by <see cref="Awake"/>.</summary>
protected override void Test()
{
_Event.Invoke();
}
/************************************************************************************************************************/
}
}
#endif