- Home /
Can you run custom code when changing scene perspective?
I would like to run a code snippet whenever the user changes between 2D and 3D perspective in the scene view, is this possible?
Great question. I'd like to know this too. I am sure this is part of Unity's code - and it doesn't appear they've made it accessible. However, I'm sure a C# guru can figure something out.
Good luck!
$$anonymous$$ore like a google guru is needed. It is an actual duplicate :).
In all fairness to the OP, I phrased this 3 or 4 ways and my Google didn't show anything useful. I guess as you said though, you have to know exactly what to search in order to find it.
Or maybe my Google is broken.
Answer by fafase · Nov 03, 2015 at 09:02 AM
http://answers.unity3d.com/questions/736515/detecting-if-the-2d-mode-button-was-pressed.html
For the sake of knowing how to make your way for this kind of questions, find where it is set, in this case, Editor Settings. Then change the display to Debug as Unity often uses different naming in editor.
Then let Google do the magic.
Your answer
Follow this Question
Related Questions
Creating a template project for non-programmers for research purposes 0 Answers
How to include custom art/styles in editor scripts 1 Answer
Responsive Editor UI Button with custom style | How to remove GUIStyle.hover delay 0 Answers
Custom debug color display for scene view? 2 Answers
Help with Missing Monobehaviours and Asset Serialization? 0 Answers