Transform and camera components in the hierarchy view

Source: Internet
Author: User

Transform and camera components in the hierarchy view

in theHierarchyview, selectCamera, and then inInspectorView to view its components,1-8is shown. ForTransformand theCameracomponents, for usedUnityreaders, but this article is selected fromNgui from introductory to actual combat tutorials.

but its name isUicamera (Script)Script Component that is theNGUIcreated byUIcontrol is unique to the. Tips:Uicamera (Script)script components are typically assigned to specific camera objects, and these cameras are unique in that they need to beUIcontrol to interact. That is to receive fromUIcontrol of various message events, such as the event that a particular button on the game interface is clickedThis article is selected fromNgui from introductory to actual combat tutorials.

Figure 1-8 Camera each component in the

Uicamera (Script) The Script component contains a number of properties:

qevent type

hint: This property contains two parameters: world and ui . The former indicates that the event came from the 3d The interaction of the game object in the world; the latter indicates that the event came from the 2d control interaction;

q Event Mask : Specifies the layer to which the event message can be received;

q Allow Multi Touch : Specifies whether multi-touch is allowed;

q Sticky Press : Specifies whether the button will bounce when the finger is pressed at a button, and then the finger slides outside the button, while the other object receives a trigger event from the finger;

Tip: Check Sticky Press property, the button continues to be pressed, even if the finger is already sliding outside the button, and the other control does not receive a trigger event from the finger;

qsticky Tooltip : Specify ui The note information on the control as the control description will be displayed after the event is triggered;

hint: sticky Tooltip When the property is checked, the note information moves over the mouse to the ui When the control is outside, the mouse moves to when the check is canceled. ui When the note information is displayed on the control, it disappears immediately after removal.

qtooltip Delay : Used to set the duration of the note information display, in seconds;

qraycast Range raycast can actually be seen as an invisible ray, It starts with the position of the mouse or the touch on the screen, emits a ray in the direction of the current camera, is used to detect collisions and other events, and some developers may want to specify the range that the ray can detect, which can be done by setting this property.

Tips: Raycast Range The default property value is -1 , indicating that there is no scope limit;

q Event Sources : This property is used to specify the source of the event the camera listens to;

hint: a total of 4 optional, mouse for listening to mouse events, can come from the left mouse button, right, middle, and scroll wheel ; touch Represents a touch event that listens on a mobile device; keyboard controller

qthresholds

hint: one with 4 A configurable value, mouse Drag Indicates that the current event is the critical value of the mouse drag event, which is the minimum number of pixels dragged by the mouse; mouse click indicates that the current event is the critical value of the mouse click event is the mouse down after the number of pixels in the drag, released the button, out of range is not determined as a click event; Span style= "line-height:1.5" >touch Drag Span style= "line-height:1.5" >touch tap Similar to the first two values that can be set, Only the mouse is replaced with a finger;

q Axes and Keys : Set NGUI plug-in input system.

tip: InUnityin whichKeysalmost all input devices have key values, for example, all keys on the keyboard have correspondingKeys, the other joystick is the same, so you can use it directlyKeysrepresents a specific key. Meanwhile,Unityput some of these commonKeysmapped to a number of otherAxesso that developers can use it directlyAxesrepresents a specific key. NGUItheAxes and Keysdefault settings for properties1-9shown, the front3one isAxes, after4one isKeys.


Figure 1-9 NGUI the Axes and Keys default settings for properties

forKeys, the reader can identify its corresponding key directly from the name, but forAxes, and it corresponds toKeysthe reader may not understand it, and the reader might sometimes need to modifyAxescorresponding to theKeys, sometimes it is added directlyAxes. Well, inUnityHow to add and modifyAxesit? Method is, clickedit| Project settings| Inputcommand, you can bring up a popup namedInputManagerdialog box in which the reader can add and modifyAxes,1-10is shownThis article is selected fromNgui from introductory to actual combat tutorials.

Figure 1-10 Unity 's default settings Axes


Transform and camera components in the hierarchy view

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.