ProjectDDD/Assets/Plugins/Pixel Crushers/Common/Scripts/Text/StringAsset.cs

33 lines
682 B
C#
Raw Normal View History

// Copyright (c) Pixel Crushers. All rights reserved.
using UnityEngine;
namespace PixelCrushers
{
/// <summary>
/// A StringAsset is a ScriptableObject that encapsulates a string. It's useful
/// to share references to a string, where the value of that string can change.
/// </summary>
public class StringAsset : ScriptableObject
{
[TextArea(minLines:3, maxLines:20)]
[SerializeField]
private string m_text;
public string text
{
get { return m_text; }
set { m_text = value; }
}
public override string ToString()
{
return text;
}
}
}