// Copyright (c) Pixel Crushers. All rights reserved.
usingUnityEngine;
namespacePixelCrushers.DialogueSystem
{
/// <summary>
/// The persistent active data component works with the PersistentDataManager to set a target
/// game object active or inactive when loading a game (or when applying persistent data
/// between level changes).
/// </summary>
/// <remarks>
/// Inactive game objects don't receive messages. Don't add this component to an inactive game
/// object. Instead, add it to a "manager" object and set the target to the object that you
/// want to activate or deactivate.
/// </remarks>
[AddComponentMenu("")]// Use wrapper.
publicclassPersistentActiveData:MonoBehaviour
{
/// <summary>
/// The target game object.
/// </summary>
[Tooltip("The GameObject to set active or inactive based on the Condition below.")]
publicGameObjecttarget;
/// <summary>
/// If this condition is <c>true</c>, the target game object is activated; otherwise it's deactivated.
/// </summary>
[Tooltip("If true, Target is activated; otherwise deactivated.")]
publicConditioncondition;
/// <summary>
/// When the script starts, check the condition and set the target GameObject active/inactive.
/// </summary>
[Tooltip("When script starts, check condition & set target GameObject active/inactive. Otherwise it only checks when a game is loaded or entering from another scene.")]