- Home /
Question by
whisp · Mar 11, 2018 at 07:01 PM ·
custom editor
Select between different Custom Editors for same Monobehaviour
A script creates a GameObject and adds a component to it. The components takes Side Length (float) as a parameter. In a specific case, where the component is used for a Tile Map, it would be more intuitive for the user to enter values for "Tile Length" and "Side length in tiles" instead, which, multiplied, equal Side Length. This multiplication is something the Custom Editor could do and put the result into "Side Length", but there's already a Custom Editor that wants "Tile Length" directly (which is perfectly fine in other scenarios).
Is there a way to select between different Custom Editors for the same Monobehaviour? (Without creating an extra Monobehaviour that inherits from the other one.)
Comment