123456789101112131415161718192021222324252627282930313233343536 |
- using System.Collections.Generic;
- using UnityEngine;
- public class TempTest : MonoBehaviour
- {
- public List<GameObject> list1;
- public List<GameObject> list2;
- public RectTransform content1;
- public RectTransform content2;
- void Update()
- {
- if(SelectView.IsViewOne)
- {
- for (int i = 0; i < list1.Count; i++)
- {
- list2[i].transform.localRotation = list1[i].transform.localRotation;
- list2[i].transform.localScale = list1[i].transform.localScale;
- content2.anchoredPosition = content1.anchoredPosition;
- }
- }
- else
- {
- for (int i = 0; i < list2.Count; i++)
- {
- list1[i].transform.localRotation = list2[i].transform.localRotation;
- list1[i].transform.localScale = list2[i].transform.localScale;
- content1.anchoredPosition = content2.anchoredPosition;
- }
- }
- }
- }
- public static class SelectView
- {
- public static bool IsViewOne;
- }
|