Files
UltimateFishing/Assets/Scripts/Assembly-CSharp/BitStrap/Examples/StringHelperExample.cs
2026-02-21 16:45:37 +08:00

21 lines
536 B
C#

using UnityEngine;
namespace BitStrap.Examples
{
public class StringHelperExample : MonoBehaviour
{
[HelpBox("if passed with same values, it won't generate garbage!", HelpBoxAttribute.MessageType.Warning, order = 1)]
[Header("Edit the fields and click the buttons to test them!", order = 0)]
public string format = "This is a format with the number {0}.";
public int number = 99;
[Button]
public void FormatStringWithNumber()
{
string message = StringHelper.Format(format, number);
Debug.Log(message);
}
}
}