- Home /
Selecting objects in scene view with left mouse button always selects child object.
I have lots of objects that have 1 child object which is basically just a sprite renderer and 1 script. When I left click the object in scene view and try to move, it moves the child sprite and not the whole parent object, because unity thinks I want to select the child. Is there a setting to switch that? It makes rearranging things unintuitive and leads to weird problems where for example the enemy itself is in one place, but its sprite is somewhere else.
Answer by villevli · May 29, 2017 at 05:51 PM
Add this script to the parent object
using UnityEngine;
[SelectionBase]
public class SelectionBase : MonoBehaviour { }
If you already have a script for the parent object you can just add the SelectionBase attribute to it.
With Prefabs this only works in the Prefab View. Is there a way to make it work inside the scene view on Prefabs?