41 lines
943 B
C#
41 lines
943 B
C#
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<MyStruct> myStructs = new List<MyStruct>()
|
|
{
|
|
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");
|
|
}
|
|
}
|