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()); } } }
public void ResetAll() { VRCattleManager.instance.OnSelectClear(); ResetDisable(); ResetTransparent(); VRCattleUndo.Clear(); }
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()); } } }
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); } }
public void Undo() { VRCattleUndo.Pop(); }