正規表現で数字だけ抜き出す。
using System.Text.RegularExpressions; string str = Regex.Replace (gameObject.name, @"[^0-9]", ""); Debug.Log (str);
正規表現で数字だけ抜き出す。
using System.Text.RegularExpressions; string str = Regex.Replace (gameObject.name, @"[^0-9]", ""); Debug.Log (str);