TestGrid.cs 579 B

12345678910111213141516171819202122232425
  1. using SC.XR.Unity;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. public class TestGrid : MonoBehaviour
  6. {
  7. // Start is called before the first frame update
  8. void Start()
  9. {
  10. var scgrid = transform.gameObject.AddComponent<SCGridLayoutGroup>();
  11. scgrid.IsIgnoreInactiveObj = true;
  12. scgrid.SpaceX = 2f;
  13. scgrid.LayoutType = LayoutTypes.Vertical;
  14. scgrid.Rows = 1;
  15. scgrid.RefreshInfo();
  16. ////Destroy(scgrid);
  17. }
  18. // Update is called once per frame
  19. void Update()
  20. {
  21. }
  22. }