コード例 #1
0
ファイル: RectCulling.cs プロジェクト: ParkDaeyeon/ProjectB
            public void UpdateEnable(RectCulling rc)
            {
                if (!this.target)
                {
                    this.isEnabled = false;
                    return;
                }

                this.isEnabled = this.target.gameObject.activeSelf;
            }
コード例 #2
0
ファイル: RectCulling.cs プロジェクト: ParkDaeyeon/ProjectB
        public static RectCulling CreateSampleObject(Transform parent)
        {
            RectCulling component = UIExtension.CreateUIObject <RectCulling>("RectCulling", parent, Vector3.zero, new Vector2(100, 100));

            component.cullRectTrans = component.GetComponent <RectTransform>();
            component.list          = new List <CullData>();

            var imgVisibled = UIExtension.CreateUIObject <Image>("Visibled", component.CachedTransform, new Vector3(0, 0), new Vector2(30, 30));

            component.list.Add(new CullData(component, imgVisibled.rectTransform));
            var imgInvisibled = UIExtension.CreateUIObject <Image>("Invisibled", component.CachedTransform, new Vector3(-150, 0), new Vector2(30, 30));

            component.list.Add(new CullData(component, imgInvisibled.rectTransform));
            component.EditorSetting();
            component.LateUpdate();
            return(component);
        }
コード例 #3
0
ファイル: RectCulling.cs プロジェクト: ParkDaeyeon/ProjectB
 public CullData(RectCulling rc, RectTransform target)
 {
     this.target = target;
     this.UpdateEnable(rc);
     this.UpdateTransform();
 }
コード例 #4
0
ファイル: RectCulling.cs プロジェクト: ParkDaeyeon/ProjectB
        static void OnCreateSampleObject()
        {
            Transform parent = UnityEditor.Selection.activeTransform;

            RectCulling.CreateSampleObject(parent);
        }