public void GetRenderer() { selfAndChildrenRenderers_ori = new List <Renderer>(); selfAndChildrenRenderers_ori = U_Component.GetTComponent <Renderer>(transform, WE_TransformRange.SelfChildren); selfAndChildrenRenderers_tar = new List <Renderer>(); selfAndChildrenRenderers_tar = U_Component.GetTComponent <Renderer>(brother, WE_TransformRange.SelfChildren); }
public void MeshRendererConvex() { List <MeshCollider> colliders = U_Component.GetChildrenComponents <MeshCollider>(transform, true); foreach (MeshCollider collider in colliders) { collider.convex = true; } }
public void RemoveAllCollider() { List <Renderer> renderers = U_Component.GetChildrenComponents <Renderer>(transform, true); foreach (Renderer renderer in renderers) { if (renderer.gameObject.GetComponent <Collider>() != null) { DestroyImmediate(renderer.gameObject.GetComponent <Collider>()); } } }
public void AddMeshColliderToObjHaveRenderer() { List <Renderer> renderers = U_Component.GetChildrenComponents <Renderer>(transform, true); foreach (Renderer renderer in renderers) { if (renderer.gameObject.GetComponent <Collider>() == null) { renderer.gameObject.AddComponent <MeshCollider>(); } } }
public void RemoveData() { groupCount = 0; allStepCount = 0; U_List.ClearList(brother, oriTrans_Obj, oriTrans_AllStep, tarTrans_AllStep); U_List.ClearList(assembles_Obj); U_List.ClearList(eachGroupCount); U_List.ClearList(oriGroupList, tarGroupList); U_List.ClearList(casGroupList); U_Component.RemoveChildrenComponents <C_AssembleOBJ>(transform, true, true); }
public void MeshRendererToBoxRenderer() { List <MeshCollider> colliders = U_Component.GetChildrenComponents <MeshCollider>(transform, true); foreach (MeshCollider collider in colliders) { if (!collider.convex) { if (collider.transform.localScale.x > 0 && collider.transform.localScale.y > 0 && collider.transform.localScale.z > 0) { collider.gameObject.AddComponent <BoxCollider>(); DestroyImmediate(collider); } } } }
void GetObjects() { hightlightObjects = U_Component.GetChildrenComponents <OutlineObj>(transform); }