ItemSenceSmallList.cs 608 B

1234567891011121314151617181920
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using XRTool.Util;
  5. public class ItemSenceSmallList : UnitySingleton<ItemSenceSmallList>
  6. {
  7. public GameObject ItemSence;
  8. public void Init(List<SceneConfig> scenes, SceneConfig currentScene)
  9. {
  10. for (int i = 0; i < scenes.Count; i++)
  11. {
  12. GameObject obj = Instantiate(ItemSence, transform) as GameObject;
  13. int Index = obj.transform.GetSiblingIndex();
  14. obj.transform.GetComponent<ItemSenceView>().Init(scenes[i].Id, scenes[i].SceneName, currentScene);
  15. }
  16. }
  17. }