CustomAssets
Askowl Custom Assets
Mutable/String.cs
1 // Copyright 2018 (C) paul@marrington.net http://www.askowl.net/unity-packages
2 
3 using Askowl;
4 using UnityEngine;
5 
6 namespace CustomAsset.Mutable {
7  /// <a href="http://bit.ly/2QP2Kn9">CustomAsset that contains a string. Events are triggered every time the string changes</a> <inheritdoc />
8  [CreateAssetMenu(menuName = "Custom Assets/Mutable/String"), Labels("Text")]
9  public class String : OfType<string> {
10  /// <a href="http://bit.ly/2QP2Kn9">Set or retrieve text contents</a>
11  public string Text { get => Value; set => Value = value; }
12 
13  /// <a href="http://bit.ly/2QP2Kn9"><see cref="OfType{T}.Instance{TC}"/></a>
14  public static String Instance(string path) => Instance<String>(path);
15  }
16 }
Base class for a custom asset. Provides getters and setters for the contained value and templates for...