Obsolete 代表方法過時~ Cannot modify a value type return value of `UnityEngine.Transform.eulerAngles'. Consider storing the value in a temporary variable 則是沒辦法直接修改transform.position.x或velocity.x這樣的值~ 參考這支影片 和 【持續更新】Unity常見錯誤解決辦法
using System; using System.Reflection; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string str = "Hello! This is {Student.Name}. My ID is {Student.ID}."; //string str2 = "你好!我是{Student.Name},我的ID為{Student.ID}。"; int size = 0; Student std = new Student(); std.Name = "Tim"; std.ID = "44123"; string[] temp = str.Split(' ');//以空白做分界來切割 //算出有幾個標籤 foreach (string a in temp) { //Console.Write(a + "\n"); if (a.IndexOf('{') != -1) size++; } string[] token = new string[size]; int count = 0; //把標籤拿出來並存入陣列 for (int i = 0; i < temp.Length; i++) { if (temp[i].IndexOf('{') != -1) {