Why do I appear to be missing the OnClick panel in UI Button to be able to add an OnClick event? - unity3d

I have watched a few tutorials on adding OnClick events to buttons in UI panels and they all have a panel in the button section where you can add a scrip to the on click event.
However, in my panel all I have is an expandable list that shows Persistent calls with no option to add any script (image for reference)
My Panel, with no option to add a script to OnClick Events

Your Inspector is in Debug mode which exposes all fields without applying any property drawers and editor scripts!
See Unity Manual - Inspector → Toggle Debug Mode (bottom section)
Toggling Debug Mode
Normally, the Inspector window is configured as an editor for the selection’s properties. But sometimes it’s useful to only see the properties and their values. When you activate Debug mode, the Inspector shows only the properties and their values. If the selection has script components, Debug mode also displays private variables, although you can’t edit their values
You can toggle Debug mode for each Inspector window individually.
To turn on Debug mode, click the More Items ⋮ button to open the context menu, and select Debug.
To return to Normal mode, click the More Items ⋮ button to open the context menu, and select Normal.
In theory you could still add elements to the Persistent Calls list by editing the size value ... but really just switch back to normal mode ;)

Related

Can not click on an UI element in editor mode in Unity

Usually you can click on an UI element (which is placed inside the canvas) in editor mode and the clicked element highlighted in the project hierarchy and you can see its properties in inspector. And it works this way if I create a new project.
But in my current project I can't click on any elemnt in canvas in editor mode because it's not responsive.
For example I have a button, I can click on it in Play mode, but it's not responsive in Editor mode. I mean if I click on it in editor mode nothing occurs (there is no highlighted object appears in hierarchy and I need to searching for this button in hierarchy by myself to open its properties in inspector)
This is incredibly annoying me.
Here is my button inside the canvas
Here is the button settings
Here is the canvas settings
Here is the event system settings:
Gizmos option need to be active

VS Code - toggle search icon in Activity Bar, move from panel or back

I accidentally removed search icon in Activity Bar and don't know how to add it there again. If I click on Activity Bar, I don't see this option any more.
Update: v1.44 you can now simply drag many of the views, including "Search" from the sidebar to the panel and back. See https://code.visualstudio.com/updates/v1_44#_increased-view-placement-flexibility and https://stackoverflow.com/a/55981465/836330
Update: v1.42 added a context menu option
Move to Panel/Move to Sidebar
to certain typically sidebar views like Search, Outline and custom views. So you wouldn't have to use a setting to move the Search view back to the sidebar. Here is a demo:
Also notice that you no longer right-click in the empty space below the search inputs in the sidebar but on/near the Search header itself to bring up the toggle option.
As part of the v1.42 release the search.location setting mentioned below will be deprecated.
Your setting should migrate automatically, but you will need to use
the new generalized method to move the Search view going forward. You
do not need to enable the experimental preview setting above in order
to move the Search view with the new context menu entry.
So I don't think there is a setting anymore, you just right-click on the header text "Search" whether it is in the Panel or active in the Sidebar to move it. See the demo below.
Right-click on the "Search" header if you have it in the sidebar to "Move to Panel".
If Search is in the panel, right-click on the word Search to "Move to Sidebar".
To enable moving the Output view at this point, you need to enable workbench.view.experimental.allowMovingToNewContainer.
There is a new unbound command workbench.view.search.moveView which you can use to toggle the search position between the panel and sidebar. But note that in my testing it only works a couple of times because it focuses the panel when you move search to the sidebar - I'll file a bug.
Previous Answer::
You may have modified the setting:
"search.location": "sidebar",
which is the default to the alternative
"search.location": "panel",
which would put the search widget into the terminal panel as another tab.
As of vscode v1.35 or so, you can now right-click in the empty space below the search view (i.e., in the sidebar under the open search inputs) and you will get an option to Toggle Search View Position.
This context menu switch of the search view is persistent. It will automatically add this setting to your settings.json:
"search.location": "panel",
The only way at present (but see edit just below) to move the icon back to the activity bar (and thus the search across files functionality to the sidebar) is to change that setting to the sidebar option. Or look for this setting in the settings editor:
Search: Location
Controls whether the search will be shown as a view
in the sidebar or as a panel in the panel area for more horizontal
space.
EDIT: More recently, vscode added the abilty to right-click in the search area when it is in the panel to toggle it back to the sidebar.
In windows
file--> preferences-->settings
In mac
preferences -> settings
vs-code version 1.30.2
Step 1: Click on Edit from Navbar
Step 2: Find in Files
.
.
You can easily search for anything in the side paanel
or else if you want anything to search inside files then
Step 1: Click "Ctrl+F"

Detecting a click on Grid while row editor is opened in buffered mode

I want to show the dialog box by clicking on a different row (with options to save changes or cancel).
When Editor is open, it will catch the click and is stoping the event propagation, thus underlying Grid does not get the click event and ItemClickEvent is not being fired.
Is it possible to detect a click on the grid row through extensions or another way?
Is it possible to detect a click on the grid row through extensions or another way?
Technically speaking yes. E.g. GridFastNavigation add-on does this trick in order to make possible single click editor opening.
But you could also listen to Editor opening, see (https://vaadin.com/download/release/8.3/8.3.1/docs/api/com/vaadin/ui/components/grid/Editor.html#addOpenListener-com.vaadin.ui.components.grid.EditorOpenListener- ) when you are in unbuffered mode Editor already open, editor will re-open on the row you click. This catching this event could help you find a way.

How to inspect dialog created by right-click action in Chrome Dev Tools?

In CKEditor, we have some plugins where we can right-click an element and a dialog is offered up. I need to inspect that menu. I know that Chrome Dev Tools allows you to force the element state with :hover, :active, :focus, :visited but as far as I can tell you cannot force a right click element state.
Is there any way to force the element state to be right clicked?
Set a debug breakpoint during code that is executed while the menu is open. I believe that the command from the menu is executed before the menu is closed.
Otherwise, you can set a breakpoint for 'on dom manipulation'. See: https://developer.chrome.com/devtools/docs/javascript-debugging#breakpoints-mutation-events

Eclipse Outline view is hiding code

I'm using the Kepler CDT release (4.3.1) of Eclipse. When I click on anything in the Outline view, the corresponding editor view is reduced to showing just that item. If I click on a variable, I get a single line with just that variable. The Edit->Expand Selection options are all dimmed out. Hitting Shift-Alt-Up Arrow just moves me up to the previous item in the outline view. If I change editor tabs and come back then the Expand Selection options enable and I can manually hit Shift-Alt-Up Arrow a number of times to make the entire file visible again but clicking on anything in the outline view again will just reduce the view. Is there some new setting in Kepler that will make outline stop doing this?
Turns out the feature for Show Source of Selected Element Only was turned on. In Kepler the toolbar button for this is not visible. Even searching under quick access doesn't turn it up so it's somewhat of a puzzle how it could have been turned on. I actually thought maybe it had been removed from Kepler.
In the Customize Perspective dialog under the Tool Bar Visibility tab. In the Tool Bar Structure section I opened the area for Editor Presentation. I noticed there was actually a check next to the box for Show Source of Selected Element Only. However, it wasn't visible in the toolbar (a bug I've seen before in Eclipse) so I unchecked it and checked it. Then I exited the dialog. Now the button showed up on the toolbar. I then toggled the feature on and then off. Now clicking in the outline view works correctly.just moves to the correct spot.