/*
Yarn Spinner is licensed to you under the terms found in the file LICENSE.md.
*/
using System;
using UnityEngine;
namespace Yarn.Unity.Attributes
{
///
/// Specifies that a field represents a reference to a named Yarn node that
/// exists in a Yarn project.
///
///
///
/// This attribute causes the inspector to draw a popup that allows
/// selecting a node from a list of all nodes available in a Yarn project.
///
///
/// This attribute may only be used with fields.
///
///
[AttributeUsage(AttributeTargets.Field)]
public class YarnNodeAttribute : PropertyAttribute
{
///
/// The name of a property that specifies the YarnProject containing the desired node.
///
public readonly string yarnProjectAttribute;
public readonly bool requiresYarnProject;
///
/// Initialises a new instance of .
///
///
public YarnNodeAttribute(string yarnProjectAttribute, bool requiresYarnProject = true)
{
this.yarnProjectAttribute = yarnProjectAttribute;
this.requiresYarnProject = requiresYarnProject;
}
}
}