- Home /
Prevent selection of sub-object
I have some game objects in my scene which have several child meshes.
I want to give my scene to another person who will build design some new scenes from my building blocks.
The problem is that some times, when you click on one of the child meshes, it selects the child mesh, and moves it independently of the parent object. For example: Move the car wheels without the moving the car.
To make things simple for my level designer, I would like to make it so you cannot select/move certain child objects. (only their parents). A level designer has no buisness messing about with the wheels. If he does so, it's only by accident.
Is there a way to achieve this?
Answer by Cherno · Oct 29, 2016 at 10:50 PM
You can use the SelectionBaseAttribute to define a base object that will be selected instead of a child gameobject.
See also Selection Base
Your answer
Follow this Question
Related Questions
Objects in-editor that copy their components instead of stretching 0 Answers
Getting Scenes in Project From Editor 2 Answers
Create a new scene from editor script 1 Answer
Cannot close/unload a scene that is open in editor during playmode (using C# code)? 3 Answers
Load specific scene in editor 2 Answers