- Home /
Question by
TyounanMOTI · Apr 08 at 05:02 AM ·
editor-scripting
How to get the instance of active EditorTool?
Hi, I'm trying to add my custom EditorTool to SceneView. I want to change some properties like a brush color and a brush size of my custom tool, so writing a code to show a Overlay in SceneView. It shows ColorField on Overlay. But I encountered the issue that ToolManager doesn't have the method to get instance of current active EditorTool. So I can't set the Color value of ColorField to my custom EditorTool.
How to get the instance of active EditorTool? Or should I set Color value to a static member of my custom tool?
Thanks!
Comment
Answer by TyounanMOTI · Apr 08 at 09:09 AM
I've managed to change color by holding the value in a ScriptableSingleton. Thank you!