using System.Collections; using System.Collections.Generic; using UnityEngine; public struct MyStruct { public int i; public string a; public float j; public GameObject gameObject; public MyStruct(int i, float j, GameObject gameObject,string a) { this.i = i; this.j = j; this.gameObject = gameObject; this.a = a; } } public class HotUpdateTest : MonoBehaviour { void Start() { Debug.Log("HotUpdate Version 5"); List myStructs = new List() { new MyStruct(10, 2, gameObject,"A"), new MyStruct(11, 4, gameObject, "B"), new MyStruct(12, 6, gameObject, "C"), }; foreach (var s in myStructs) { Debug.Log($"i:{s.i} j:{s.j} name:{s.gameObject.name}"); } Debug.Log($"xxxxxy4"); Debug.Log($"xxxxxy5"); Debug.Log($"xxxxxy6"); } }