Question by
Saripsis · Apr 27, 2017 at 08:05 PM ·
colliderscene view
View Colliders when not selected
I'm trying to place multiple box colliders along a path. I can only see the collider I'm working on. When I have that one selected the others disappear. Is there a way to have all the colliders visible even if they are not selected?
Comment
Best Answer
Answer by Jawchewa · Apr 28, 2017 at 03:20 AM
https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnDrawGizmos.html?from=Gizmos
One way to make the colliders visible when not selected would be to use a gizmo. Attach this script to each of your colliders to make them constantly visible in the editor.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ShowCollider : MonoBehaviour {
void OnDrawGizmos() {
Gizmos.color = Color.yellow;
Gizmos.DrawWireCube(transform.position, transform.lossyScale);
}
}
Your answer
Follow this Question
Related Questions
On collision enter next scene 2 Answers
How to destroy Terrain-Tree-Collider? 3 Answers
Problem with collider 2 Answers
Collision Won't Work!! 0 Answers
Animations with Colliders 0 Answers