예제 #1
0
        public void DisableOther()
        {
            List <GameObject> list = new List <GameObject>();
            bool isNeed            = false;
            int  count             = VRCattleManager.allObjs.Count;

            if (VRCattleManager.selectedObjs.Count > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    Transform t = VRCattleManager.allObjs[i];
                    if (!VRCattleManager.selectedObjs.Contains(t))
                    {
                        if (t.gameObject.activeSelf && !isNeed)
                        {
                            isNeed = true;
                        }
                        list.Add(t.gameObject);
                    }
                }
                if (isNeed)
                {
                    VRCattleUndo.DisableObj(list.ToArray());
                }
            }
        }
예제 #2
0
 public void ResetAll()
 {
     VRCattleManager.instance.OnSelectClear();
     ResetDisable();
     ResetTransparent();
     VRCattleUndo.Clear();
 }
예제 #3
0
        public void TransparentOther()
        {
            List <MeshRenderer> list = new List <MeshRenderer>();
            bool isNeed = false;
            int  count  = VRCattleManager.allObjs.Count;

            if (VRCattleManager.selectedObjs.Count > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    Transform t = VRCattleManager.allObjs[i];
                    if (!VRCattleManager.selectedObjs.Contains(t))
                    {
                        MeshRenderer mr = t.GetComponent <MeshRenderer>();
                        if (mr.material.color.a != VRCattleManager.transparentValue)
                        {
                            isNeed = true;
                        }
                        list.Add(mr);
                    }
                }
                if (isNeed)
                {
                    VRCattleUndo.TransparentObj(list.ToArray());
                }
            }
        }
예제 #4
0
        public void Disable()
        {
            int count = VRCattleManager.selectedObjs.Count;

            if (count > 0)
            {
                GameObject[] objs = new GameObject[count];
                for (int i = 0; i < count; i++)
                {
                    Transform t = VRCattleManager.selectedObjs[i];
                    objs[i] = t.gameObject;
                    BlurOutlineCommandBuffer.Remove(t.GetComponent <Renderer>());
                }
                VRCattleManager.selectedObjs.Clear();
                VRCattleUndo.DisableObj(objs);
            }
        }
예제 #5
0
 public void Undo()
 {
     VRCattleUndo.Pop();
 }