static bool MenuVerifyDoSomethingWithPbObject() { // Using pb_EditorToolbarLoader.GetInstance keeps MakeFacesDoubleSided as a singleton. MakeFacesDoubleSided instance = pb_EditorToolbarLoader.GetInstance <MakeFacesDoubleSided>(); return(instance != null && instance.IsEnabled()); }
static void MenuDoDoSomethingWithPbObject() { MakeFacesDoubleSided instance = pb_EditorToolbarLoader.GetInstance <MakeFacesDoubleSided>(); if (instance != null) { SceneView.lastActiveSceneView.ShowNotification(new GUIContent(instance.DoAction().notification)); } }