#if ENABLE_PROPERTY_VARIANTS || PACKAGE_DOCS_GENERATION
using System;
using UnityEngine.Events;
namespace UnityEngine.Localization.PropertyVariants.TrackedObjects
{
///
/// Uses JSON to apply variant data to target object.
///
///
/// This shows how to configure a to apply changes to a custom script.
///
///
[Serializable]
[CustomTrackedObject(typeof(MonoBehaviour), true)]
public class TrackedMonoBehaviourObject : JsonSerializerTrackedObject
{
[SerializeField]
UnityEvent m_Changed = new UnityEvent();
public UnityEvent Changed => m_Changed;
protected override void PostApplyTrackedProperties()
{
base.PostApplyTrackedProperties();
m_Changed.Invoke();
}
}
}
#endif