Hello,
I want to keep one of a gameObject selected. I know I can use Selection.activeGameObject. However, when I click another place in my scene, the selected gameObject got changed. I really need to keep one of a gameobject selected no matter what happens in EditorMode. How can I do it?
Thank you very much.
What is use case for such required behavior? You still can navigate camera.
However, you can lock inspector with desired selection. You can have multiple inspectors, showing properties of different objects at the same time.
I am implementing am editor which can preview a prefab. I don’t want my user to click other items in the scene.
Are you working on some moding tool, within Unity editor?
No, I am building a custom editor like a modeling tool
Ok, that makes sense.
For that, you would be probably better to wait for an answer, from someone with better understanding of the matter.
Sorry, I can not be more helpful here.