string型をint型に変換する方法を忘れてしまったので自分用にメモ。
[ 変換方法 ]
下記はstring型のStringTestをint型に変換しIntTestに代入しています。
using System.Collections; using System.Collections.Generic; using UnityEngine; public class ScriptTest : MonoBehaviour { void Start() { string StringTest = ""; int IntTest = 0; IntTest = int.Parse(StringTest); } }