Pytanie |
Odpowiedź |
rozpocznij naukę
|
|
You can either dock it into place in the Editor
|
|
|
rozpocznij naukę
|
|
You can click the small triangle to expand or collapse the folder, displaying any nested folders it contains
|
|
|
rozpocznij naukę
|
|
Adding multiple labels will narrow the search to items that have any of the specified labels
|
|
|
rozpocznij naukę
|
|
The Scene view is your interactive view into the world you are creating
|
|
|
rozpocznij naukę
|
|
You can use the Scene view to select and position scenery, characters, cameras, lights
|
|
|
rozpocznij naukę
|
|
The Orthographic view has no perspective, and is useful in combination with clicking one of the conical axis arms to get a front, top or side elevation
|
|
|
rozpocznij naukę
|
|
If your Scene view is in an awkward viewpoint (upside-down, or just an angle you find confusing), Shift-click the cube at the center of the Scene Gizmo
|
|
|
rozpocznij naukę
|
|
Click on the padlock on the top right of the Scene Gizmo to enable or disable rotation of the Scene
|
|
|
rozpocznij naukę
|
|
Note that in 2D Mode the Scene Gizmo does not appear, because the only option is to have the view looking perpendicularly at the XY plane
|
|
|
орбита,вращатьсЯ по орбите rozpocznij naukę
|
|
Move, orbit, and zoom in the Scene view
|
|
|
rozpocznij naukę
|
|
You can use the Arrow Keys to move around the Scene as though ТwalkingУ through it
|
|
|
rozpocznij naukę
|
|
The Left and Right arrow keys pan the view sideways
|
|
|
rozpocznij naukę
|
|
If a GameObject is active in the Scene view, Unity doesnХt display any visible cues that itХs active
|
|
|
rozpocznij naukę
|
|
However, if you are working with a large Scene containing a lot of Scene items (such as GameObjects, Terrain objects, Cameras, and Lights), selecting multiple objects can be very tricky
|
|
|
rozpocznij naukę
|
|
For example, if you are working in a large Scene with over 10,000 objects, you can temporarily block specific GameObjects from being selected to prevent accidental editing
|
|
|
rozpocznij naukę
|
|
They retain whatever pickability status they had previously
|
|
|
rozpocznij naukę
|
|
They retain whatever pickability status they had previously
|
|
|
rozpocznij naukę
|
|
At the center of the Move Gizmo, there are three small squares you can use to drag the GameObject within a single plane (meaning you can move two axes at once while the third keeps still).
|
|
|
rozpocznij naukę
|
|
The Scale tool lets you rescale the GameObject evenly on all axes at once by clicking and dragging on the cube at the center of the Gizmo
|
|
|
rozpocznij naukę
|
|
You can also scale the axes individually, but you should take care if you do this when there are child GameObjects, because the effect can look quite strange
|
|
|
rozpocznij naukę
|
|
To rotate the GameObject, position your cursor just beyond a corner of the rectangle
|
|
|
rozpocznij naukę
|
|
Its Gizmo provides handles for movement and rotation
|
|
|
rozpocznij naukę
|
|
Use vertex snapping to quickly assemble your Scenes: take any vertex from a given Mesh and place that vertex in the same position as any vertex from any other Mesh you choose
|
|
|
rozpocznij naukę
|
|
You can customize the grid in appearance and behavior by changing the following
|
|
|
rozpocznij naukę
|
|
The size of the grid (adjust the distance between the lines).
|
|
|
rozpocznij naukę
|
|
Use the Move property with the link icon selected to enter a uniform increment snap value for all axes, or unlink the axes and set different increment snap values in the X, Y, and Z axis properties.
|
|
|
rozpocznij naukę
|
|
To nudge the grid backward, use Shift+[
|
|
|
rozpocznij naukę
|
|
Next to the World Grid heading, click the gear icon
|
|
|
rozpocznij naukę
|
|
This means you canХt accidentally remove GameObjects from the rendered scene, or trigger unnecessary bake jobs for lighting, occlusion, and other systems
|
|
|
rozpocznij naukę
|
|
This means you canХt accidentally remove GameObjects from the rendered scene, or trigger unnecessary bake jobs for lighting, occlusion, and other systems
|
|
|
rozpocznij naukę
|
|
This makes it possible for your settings to persist from one session to the next
|
|
|
rozpocznij naukę
|
|
Turning Scene visibility on and off
|
|
|
rozpocznij naukę
|
|
The Scene visibility switch in the Scene view control bar displays the number of hidden GameObjects in the scene
|
|
|
rozpocznij naukę
|
|
The first drop-down menu selects which Draw Mode will be used to depict the Scene
|
|
|
rozpocznij naukę
|
|
The transparent colors accumulate, making it easy to spot places where one object is drawn over another
|
|
|
rozpocznij naukę
|
|
Fog: gradual fading of the view to a flat color with distance from the camera
|
|
|
rozpocznij naukę
|
|
Fog: gradual fading of the view to a flat color with distance from the camera
|
|
|
rozpocznij naukę
|
|
Check this box to enable occlusion culling in the Scene view
|
|
|
rozpocznij naukę
|
|
Check this box to make the Camera ease in and out of motion in the Scene view over the time set by Duration
|
|
|
rozpocznij naukę
|
|
To reset the properties to their default values, click the cog icon in the top right corner of the Camera settings menu and select Reset
|
|
|
соответствие,соответствовать rozpocznij naukę
|
|
When the 3D Icons checkbox is ticked, component icons are scaled by the Editor according to their distance from the Camera, and obscured by GameObjects in the Scene
|
|
|
rozpocznij naukę
|
|
When the 3D Icons checkbox is ticked, component icons are scaled by the Editor according to their distance from the Camera, and obscured by GameObjects in the Scene
|
|
|
rozpocznij naukę
|
|
Use the slider to control their apparent overall size
|
|
|
rozpocznij naukę
|
|
Use the slider to control their apparent overall size
|
|
|
rozpocznij naukę
|
|
This section appears the first time you change one or more items, and updates after subsequent changes
|
|
|
rozpocznij naukę
|
|
This section appears only when your Scene uses scripts that meet specific criteria
|
|
|
rozpocznij naukę
|
|
Some Gizmos are passive graphical overlays, shown for reference (such as the Light direction Gizmo, which shows the direction of the light)
|
|
|
rozpocznij naukę
|
|
The Editor UI darkens to remind you of this
|
|
|
rozpocznij naukę
|
|
The Editor UI darkens to remind you of this
|
|
|
rozpocznij naukę
|
|
Select different values to test how your game looks on monitors with different aspect ratios
|
|
|
rozpocznij naukę
|
|
Select different values to test how your game looks on monitors with different aspect ratios
|
|
|
rozpocznij naukę
|
|
This option is enabled by default: it causes Unity to display a warning if no Cameras are rendering to the screen
|
|
|
rozpocznij naukę
|
|
Leave this enabled unless you are intentionally not using Cameras to render your application
|
|
|
rozpocznij naukę
|
|
Leave this enabled unless you are depending on the previous frameХs contents when not in Play mode
|
|
|
rozpocznij naukę
|
|
All nested objects are still descendants of the original parent GameObject, or root GameObject
|
|
|
rozpocznij naukę
|
|
Toggling child GameObject visibility
|
|
|
rozpocznij naukę
|
|
You can cut or copy a selected GameObject and then paste it as a child of another GameObject
|
|
|
rozpocznij naukę
|
|
Right-click the intended parent GameObject, and then select Paste as Child.
|
|
|
rozpocznij naukę
|
|
In Swatches, click the outlined box / WhatХs New page outline
|
|
|
rozpocznij naukę
|
|
The contents of the Inspector change whenever the selection changes
|
|
|
rozpocznij naukę
|
|
What you can see and edit in an Inspector window depends on what you select
|
|
|
rozpocznij naukę
|
|
For example, you could use a skull and crossbones icon to indicate danger areas in a game level
|
|
|
rozpocznij naukę
|
|
You can set up a shortcut to open a focused Inspector for whichever item in the Hierarchy view or Project view that you hover the pointer over
|
|
|
rozpocznij naukę
|
|
To locate the item whose properties are displayed in a focused Inspector, do one of the following:
|
|
|
rozpocznij naukę
|
|
Hover the pointer over the focused InspectorХs tab header to display a tooltip that shows the full path to the item in the Scene Hierarchy or the Project
|
|
|
rozpocznij naukę
|
|
Properties are settings and options for GameObject components and Assets
|
|
|
rozpocznij naukę
|
|
Properties are settings and options for GameObject components and Assets
|
|
|
rozpocznij naukę
|
|
Properties are settings and options for GameObject components and Assets
|
|
|
rozpocznij naukę
|
|
Properties fall into the following major categories
|
|
|
rozpocznij naukę
|
|
Reference properties take compatible Project Assets or GameObjects in the Scene as inputs
|
|
|
rozpocznij naukę
|
|
The rest of this section describes how to set these complex properties
|
|
|
rozpocznij naukę
|
|
The Inspector window displays color properties as swatches
|
|
|
rozpocznij naukę
|
|
For example, Unity displays the HDR Color Picker window when you edit the emission color property in the standard shader
|
|
|
rozpocznij naukę
|
|
You can also use the eyedropper tool to pick color values from anywhere on the screen
|
|
|
rozpocznij naukę
|
|
They are useful for blending one color gradually into another, over space or time
|
|
|
rozpocznij naukę
|
|
A dedicated gradient editor shows the main colors, called stops, and all the intermediate shades between them in the gradient bar
|
|
|
rozpocznij naukę
|
|
A dedicated gradient editor shows the main colors, called stops, and all the intermediate shades between them in the gradient bar
|
|
|
rozpocznij naukę
|
|
Unity uses curves in a variety of different contexts, especially in animation
|
|
|
rozpocznij naukę
|
|
A bar slider is a specialized control that lets you allocate a particular resource visually
|
|
|
rozpocznij naukę
|
|
A bar slider is a specialized control that lets you allocate a particular resource visually
|
|
|
rozpocznij naukę
|
|
When a script exposes an array as a public variable, the Inspector displays a control that lets you edit both the number of items in the array (Size) and the values or references within it
|
|
|
rozpocznij naukę
|
|
Choose Reveal Current Library Location to view the current library in Windows Explorer/Mac OS Finder
|
|
|
rozpocznij naukę
|
|
You can find the Toolbar at the top of the Unity Editor. It is not a window, and is the only part of the Unity interface that you canХt rearrange
|
|
|
rozpocznij naukę
|
|
The Toolbar consists of several groups of controls
|
|
|
rozpocznij naukę
|
|
The Toolbar consists of several groups of controls
|
|
|
rozpocznij naukę
|
|
You can change the arrangement of your views and then save the new layout or load an existing from the Layout drop-down menu
|
|
|
rozpocznij naukę
|
|
The status bar provides notifications about various Unity processes, and quick access to related tools and settings
|
|
|
rozpocznij naukę
|
|
Click the icon to get additional information about the cache server, and re-establish a lost connection
|
|
|
rozpocznij naukę
|
|
The Background Tasks window displays the progress of any running asynchronous tasks
|
|
|
rozpocznij naukę
|
|
|
|
|
rozpocznij naukę
|
|
If the task is indeterminate, because its progress is not measurable, the bar shows a small filled region that moves from side to side until the task is finished
|
|
|
rozpocznij naukę
|
|
If the task is indeterminate, because its progress is not measurable, the bar shows a small filled region that moves from side to side until the task is finished
|
|
|
rozpocznij naukę
|
|
If the task is indeterminate, because its progress is not measurable, the bar shows a small filled region that moves from side to side until the task is finished
|
|
|
rozpocznij naukę
|
|
|
|
|
rozpocznij naukę
|
|
Optionally displays a short description of the current activity for an active task
|
|
|
rozpocznij naukę
|
|
When an active task takes longer than a few seconds, displays either the current time elapsed or the estimated time remaining
|
|
|
rozpocznij naukę
|
|
When an active task takes longer than a few seconds, displays either the current time elapsed or the estimated time remaining
|
|
|
rozpocznij naukę
|
|
When an active task takes longer than a few seconds, displays either the current time elapsed or the estimated time remaining
|
|
|
rozpocznij naukę
|
|
The progress window displays an overall progress entry in the parent task (1), and a sub progress entry for each child task (2).
|
|
|
rozpocznij naukę
|
|
Monitoring subtasks can help you determine which part of a complex task takes the most time
|
|
|
rozpocznij naukę
|
|
This is useful for operations like lightmap baking, which can have hundreds of subtasks
|
|
|
rozpocznij naukę
|
|
The task is running and reports progress, but cannot determine how close it is to being complete
|
|
|
rozpocznij naukę
|
|
The task finished successfully
|
|
|
rozpocznij naukę
|
|
Unresponsive: The task has not reported any progress for five seconds.
|
|
|
rozpocznij naukę
|
|
The task is no longer active because it failed
|
|
|
rozpocznij naukę
|
|
Labels currently applied to the asset have a check mark next to them.
|
|
|
rozpocznij naukę
|
|
|
|
|
планировать,план,предназначать rozpocznij naukę
|
|
However, some tasks are designed to stay in the list until you clear them manually
|
|
|
rozpocznij naukę
|
|
The Unity Editor status bar displays a global progress bar that shows the aggregate overall progress of all active tasks
|
|
|
rozpocznij naukę
|
|
The Console Window shows errors, warnings and other messages generated by Unity
|
|
|
rozpocznij naukę
|
|
The weight of the snow on the roof caused the house to collapse
|
|
|
причина,основание,вызывать rozpocznij naukę
|
|
The weight of the snow on the roof caused the house to collapse
|
|
|
rozpocznij naukę
|
|
Shows only the first instance of recurring error messages
|
|
|
rozpocznij naukę
|
|
Pauses playback whenever Debug. LogError is called from a script
|
|
|
rozpocznij naukę
|
|
Disabling this option suspends logging, but the Console remains connected to the target build
|
|
|
соответствовать,совпадать rozpocznij naukę
|
|
The Console highlights the first match in the message text when it is in the visible part of the message (see Adjusting the Line Count below).
|
|
|
rozpocznij naukę
|
|
As you type a search term, the Console filters messages to display only those that contain matching text
|
|
|
rozpocznij naukę
|
|
The Console highlights the first match in the message text when it is in the visible part of the message (see Adjusting the Line Count below).
|
|
|
rozpocznij naukę
|
|
The search looks for exact matches of whatever you type in the search bar
|
|
|
rozpocznij naukę
|
|
Click the buttons beside the search bar to toggle:
|
|
|
rozpocznij naukę
|
|
The Console can provide stack trace information for managed code and unmanaged code.
|
|
|
rozpocznij naukę
|
|
However, the full stack trace can be useful in some circumstances
|
|
|
rozpocznij naukę
|
|
It can also help you identify the area of the engine that an error originates from
|
|
|
rozpocznij naukę
|
|
This is especially useful when no managed stack trace information is available, and the error message is not very descriptive
|
|
|
rozpocznij naukę
|
|
Resolving a stack trace, especially a full stack trace, is a resource-intensive operation
|
|
|
rozpocznij naukę
|
|
Obsolete API warnings and automatic updates
|
|
|
rozpocznij naukę
|
|
Among other messages, Unity shows warnings about the usage of obsolete API calls in your code
|
|
|
rozpocznij naukę
|
|
See Adjusting the line count, below, for further information.
|
|
|
rozpocznij naukę
|
|
If stack trace is enabled, references to specific lines in code files show up as clickable links here
|
|
|
rozpocznij naukę
|
|
When you select a message and view the full text in the detail area at the bottom of the Console window, stack trace references to specific lines in code files become clickable links
|
|
|
rozpocznij naukę
|
|
UnityХs search functionality allows you to search the Scene view and Hierarchy window for GameObjects, and the Project window for assets
|
|
|
rozpocznij naukę
|
|
To select the criteria you want to search, select the magnifying glass icon on the bar to open the Search drop-down menu, and choose which criteria to use
|
|
|
rozpocznij naukę
|
|
To clear your search and return your GameObject or asset list view to normal, empty the search bar or select the small x icon in the search bar
|
|
|
rozpocznij naukę
|
|
Scene view and Hierarchy window represent the same information, and when you use one search bar, Unity automatically populates the other search bar with the same text
|
|
|
rozpocznij naukę
|
|
A search term acts as a filter for the GameObjects in the Scene view and Hierarchy Window
|
|
|
rozpocznij naukę
|
|
All the other GameObjects disappear from view
|
|
|
rozpocznij naukę
|
|
This window might be minimised; if this is the case, click and drag the title bar upwards to expand it.
|
|
|
rozpocznij naukę
|
|
Assets can have as many labels as desired and belong to several different label groups at once
|
|
|
rozpocznij naukę
|
|
To remove a label from an asset, open the label menu and select it to remove the tick icon
|
|
|
rozpocznij naukę
|
|
You can customize your Layout of Views by click-dragging the Tab of any View to one of several locations
|
|
|
rozpocznij naukę
|
|
Tabs can also be detached from the Main Editor Window and arranged into their own floating Editor Windows
|
|
|
rozpocznij naukę
|
|
Whenever youХre working in tabbed views, the ТactiveУ tab (the tab that has focus) has a thin blue stripe at the top
|
|
|
rozpocznij naukę
|
|
Whenever youХre working in tabbed views, the ТactiveУ tab (the tab that has focus) has a thin blue stripe at the top
|
|
|
rozpocznij naukę
|
|
When you open more tabs than Unity can fit in a viewХs tab area, small navigation arrows appear
|
|
|
rozpocznij naukę
|
|
A completely custom Layout
|
|
|
rozpocznij naukę
|
|
Unity empowers game designers to make games
|
|
|
rozpocznij naukę
|
|
WhatХs really special about Unity is that you donХt need years of experience with code or a degree in art to make fun games
|
|
|
горсть,небольшое количество rozpocznij naukę
|
|
There are a handful of basic workflow concepts needed to learn Unity
|
|
|
rozpocznij naukę
|
|
There are a handful of basic workflow concepts needed to learn Unity
|
|
|
rozpocznij naukę
|
|
There are a handful of basic workflow concepts needed to learn Unity
|
|
|
rozpocznij naukę
|
|
Once understood, you will find yourself making games in no time
|
|
|
улучшать,совершенствовать rozpocznij naukę
|
|
With the time you will save getting your games up and running, you will have that much more time to refine, balance, and tweak your game to perfection
|
|
|
rozpocznij naukę
|
|
This section will explain the core concepts you need to know for creating gameplay mechanics
|
|
|
rozpocznij naukę
|
|
The majority of these concepts require you to write Scripts
|
|
|
rozpocznij naukę
|
|
Scenes are where you work with content in Unity
|
|
|
rozpocznij naukę
|
|
WhatХs really special about Unity is that you donХt need years of experience with code or a degree in art to make fun games
|
|
|
rozpocznij naukę
|
|
For example, you might build a simple game in a single scene, while for a more complex game, you might use one scene per level, each with its own environments, characters, obstacles, decorations, and UI
|
|
|
rozpocznij naukę
|
|
For example, you might build a simple game in a single scene, while for a more complex game, you might use one scene per level, each with its own environments, characters, obstacles, decorations, and UI
|
|
|
украшение,внутреннЯЯ отделка rozpocznij naukę
|
|
For example, you might build a simple game in a single scene, while for a more complex game, you might use one scene per level, each with its own environments, characters, obstacles, decorations, and UI
|
|
|
булавка,заколка,приколоть rozpocznij naukę
|
|
Pinned templates appear before other templates in the New Scene dialogХs template list
|
|
|
разместить,определЯть место rozpocznij naukę
|
|
To highlight the template in the Project window, select the Locate link
|
|
|
rozpocznij naukę
|
|
If you want Unity to load the new scene additively (see note below), enable Load Additively.
|
|
|
rozpocznij naukę
|
|
If the template does not have any cloneable dependencies, Unity loads the new scene in memory, but does not save it
|
|
|
rozpocznij naukę
|
|
To create a new scene from a C# script using a specific scene template, use the Instantiate method
|
|
|
rozpocznij naukę
|
|
You can open multiple scenes for editing at the same time
|
|
|
rozpocznij naukę
|
|
Multi Scene Editing allows you to have multiple scenes open in the editor simultaneously, and makes it easier to manage scenes at runtime
|
|
|
rozpocznij naukę
|
|
The ability to have multiple scenes open in the editor allows you to create large streaming worlds and improves the workflow when collaborating on scene editing
|
|
|
rozpocznij naukę
|
|
The ability to have multiple scenes open in the editor allows you to create large streaming worlds and improves the workflow when collaborating on scene editing
|
|
|
rozpocznij naukę
|
|
The multi scene editing integration in the Editor
|
|
|
rozpocznij naukę
|
|
When you have multiple scenes open in the editor, each sceneХs contents are displayed separately in the hierarchy window.
|
|
|
rozpocznij naukę
|
|
Each sceneХs contents appears below a scene divider bar which shows the sceneХs name and its save state
|
|
|
rozpocznij naukę
|
|
While present in the hierarchy, scenes can be loaded or unloaded to reveal or hide the gameobjects contained within each scene
|
|
|
rozpocznij naukę
|
|
The scene dividers can be collapsed in the hierarchy to the sceneХs contents which may help you to navigate your hierarchy if you have lots of scenes loaded
|
|
|
rozpocznij naukę
|
|
Scenes with unsaved changes will have an asterisk shown next to the name in the scene divider bar
|
|
|
rozpocznij naukę
|
|
An asterisk in the scene divider indicating this scene has unsaved changes
|
|
|
rozpocznij naukę
|
|
The lightmaps and realtime GI data atlases are split between scenes
|
|
|
rozpocznij naukę
|
|
Cross-Scene references are not supported, and are prevented in Edit mode
|
|
|
rozpocznij naukę
|
|
It is recommended to avoid using DontDestroyOnLoad to persist manager GameObjects that you want to survive across scene loads
|
|
|
rozpocznij naukę
|
|
Creating scene templates: Describes the different ways to create a scene template
|
|
|
rozpocznij naukę
|
|
To revert to UnityХs default asset type list and settings, click the Reset Defaults button
|
|
|
rozpocznij naukę
|
|
However, a GameObject canХt do anything on its own
|
|
|
rozpocznij naukę
|
|
GameObjects are the fundamental objects in Unity that represent characters, props and scenery
|
|
|
rozpocznij naukę
|
|
GameObjects are the fundamental objects in Unity that represent characters, props and scenery
|
|
|
rozpocznij naukę
|
|
They do not accomplish much in themselves but they act as containers for Components, which implement the functionality
|
|
|
rozpocznij naukę
|
|
They do not accomplish much in themselves but they act as containers for Components, which implement the functionality
|
|
|
rozpocznij naukę
|
|
They do not accomplish much in themselves but they act as containers for Components, which implement the functionality
|
|
|
rozpocznij naukę
|
|
A solid cube object has a Mesh Filter and Mesh Renderer component, to draw the surface of the cube, and a Box Collider component to represent the objectХs solid volume in terms of physics
|
|
|
rozpocznij naukę
|
|
A solid cube object has a Mesh Filter and Mesh Renderer component, to draw the surface of the cube, and a Box Collider component to represent the objectХs solid volume in terms of physics
|
|
|
rozpocznij naukę
|
|
There are also many useful pre-constructed objects (primitive shapes, Cameras, etc) available on the GameObject > 3D Object menu, see Primitive Objects
|
|
|
rozpocznij naukę
|
|
There are also many useful pre-constructed objects (primitive shapes, Cameras, etc) available on the GameObject > 3D Object menu, see Primitive Objects
|
|
|
rozpocznij naukę
|
|
Since GameObjects are a very important part of Unity, there is a lot of content manual with extensive detail about them
|
|
|
rozpocznij naukę
|
|
Since GameObjects are a very important part of Unity, there is a lot of content manual with extensive detail about them
|
|
|
rozpocznij naukę
|
|
You can find out more about controlling GameObjects from scripts on the GameObject scripting reference page
|
|
|
rozpocznij naukę
|
|
Transforms are manipulated in 3D space in the X, Y, and Z axes or in 2D space in just X and Y
|
|
|
rozpocznij naukę
|
|
In Unity, these axes are represented by the colors red, green, and blue respectively
|
|
|
rozpocznij naukę
|
|
There is also an additional option in Translate mode to lock movement to a particular plane (ie, allow dragging in two of the axes while keeping the third unchanged).
|
|
|
rozpocznij naukę
|
|
So your hands could be regarded as ТchildrenУ of your arms and then each hand has several fingers, etc
|
|
|
rozpocznij naukę
|
|
So your hands could be regarded as ТchildrenУ of your arms and then each hand has several fingers, etc
|
|
|
rozpocznij naukę
|
|
So your hands could be regarded as ТchildrenУ of your arms and then each hand has several fingers, etc
|
|
|
rozpocznij naukę
|
|
The object at the very top of a hierarchy (ie, the only object in the hierarchy that doesnХt have a parent) is known as the root
|
|
|
rozpocznij naukę
|
|
GameObjects with foldout arrows to the left of their names are parents
|
|
|
rozpocznij naukę
|
|
For scene construction, it is usually sufficient to work with local coordinates for child objects but in gameplay it is often useful to find their exact position in world space or global coordinates
|
|
|
rozpocznij naukę
|
|
For scene construction, it is usually sufficient to work with local coordinates for child objects but in gameplay it is often useful to find their exact position in world space or global coordinates
|
|
|
rozpocznij naukę
|
|
Non-uniform scaling can be useful in a few specific cases but it introduces a few oddities that donХt occur with uniform scaling
|
|
|
rozpocznij naukę
|
|
In cases like this the circular shape will not become elliptical under non-uniform scaling as you would expect and will simply remain circular
|
|
|
rozpocznij naukę
|
|
When a child object has a non-uniformly scaled parent and is rotated relative to that parent, it may appear skewed or ТshearedУ
|
|
|
rozpocznij naukę
|
|
For example, a skewed Box Collider will not match the shape of the rendered mesh accurately
|
|
|
rozpocznij naukę
|
|
As a result, the childХs shape may appear to change abruptly when the scale eventually is updated, say if the child object is detached from the parent
|
|
|
rozpocznij naukę
|
|
As a result, the childХs shape may appear to change abruptly when the scale eventually is updated, say if the child object is detached from the parent
|
|
|
rozpocznij naukę
|
|
Certain optimizations occur based on the import size, and instantiating an object that has an adjusted scale value can decrease performance
|
|
|
rozpocznij naukę
|
|
The meshХs size in Unity (and therefore the TransformХs scale) is very important, especially during physics simulation
|
|
|
rozpocznij naukę
|
|
By default, the physics engine assumes that one unit in world space corresponds to one metre
|
|
|
rozpocznij naukę
|
|
By default, the physics engine assumes that one unit in world space corresponds to one metre
|
|
|
rozpocznij naukę
|
|
The simulation is actually correct since effectively, you are watching a very large object falling a great distance
|
|
|
rozpocznij naukę
|
|
Certain optimizations occur based on the import size, and instantiating an object that has an adjusted scale value can decrease performance
|
|
|
rozpocznij naukę
|
|
Tips for Working with Transforms
|
|
|
rozpocznij naukę
|
|
This page describes how to view and interact with components, and provides a brief overview of the most common component configurations in Unity
|
|
|
rozpocznij naukę
|
|
This page describes how to view and interact with components, and provides a brief overview of the most common component configurations in Unity
|
|
|
rozpocznij naukę
|
|
See the Scripting section for guidance on how to control and interact with components through script
|
|
|
rozpocznij naukę
|
|
This section details some fundamental default component configurations in Unity
|
|
|
rozpocznij naukę
|
|
The Transform component also enables the concept of parenting, which allows you to make a GameObject a child of another GameObject and control its position via the parentХs Transform component
|
|
|
принимать,ловить(сигналы) rozpocznij naukę
|
|
It contains the Transform component, the Camera component, and an Audio Listener to pick up audio in your application
|
|
|
rozpocznij naukę
|
|
This GameObject is configured to act as the primary camera in your game
|
|
|
rozpocznij naukę
|
|
The Transform component also enables the concept of parenting, which allows you to make a GameObject a child of another GameObject and control its position via the parentХs Transform component
|
|
|
rozpocznij naukę
|
|
Components are the nuts & bolts of objects and behaviors in a game
|
|
|
rozpocznij naukę
|
|
Components are the nuts & bolts of objects and behaviors in a game
|
|
|
rozpocznij naukę
|
|
If you donХt yet understand the relationship between Components and GameObjects, read the GameObjects page before going any further
|
|
|
rozpocznij naukę
|
|
This is because the Transform dictates where the GameObject is located, and how it is rotated and scaled
|
|
|
rozpocznij naukę
|
|
The browser lets you navigate the components conveniently by category and also has a search box that you can use to locate components by name
|
|
|
rozpocznij naukę
|
|
If you want to know more about using a particular Component, you can read about any of them in the relevant Component Reference page
|
|
|
rozpocznij naukę
|
|
One of the great aspects of Components is flexibility
|
|
|
rozpocznij naukę
|
|
One of the great aspects of Components is flexibility
|
|
|
rozpocznij naukę
|
|
The same commands are also available from the kebab menu (3 vertical dots) icon in the extreme top-right of the componentХs panel in the inspector
|
|
|
rozpocznij naukę
|
|
The same commands are also available from the kebab menu (3 vertical dots) icon in the extreme top-right of the componentХs panel in the inspector
|
|
|
rozpocznij naukę
|
|
This workflow gives you incredible power to experiment, adjust, and refine your gameplay without investing a lot of time in iteration cycles
|
|
|
rozpocznij naukę
|
|
This workflow gives you incredible power to experiment, adjust, and refine your gameplay without investing a lot of time in iteration cycles
|
|
|
rozpocznij naukę
|
|
This workflow gives you incredible power to experiment, adjust, and refine your gameplay without investing a lot of time in iteration cycles
|
|
|
rozpocznij naukę
|
|
|
|
|
rozpocznij naukę
|
|
We think youХll be impressed
|
|
|
rozpocznij naukę
|
|
namely the Cube, Sphere, Capsule, Cylinder, Plane and Quad
|
|
|
rozpocznij naukę
|
|
However, there are also a number of primitive object types that can be created directly within Unity, namely the Cube, Sphere, Capsule, Cylinder, Plane and Quad
|
|
|
соответствующий,подходЯщий rozpocznij naukę
|
|
Any of the primitives can be added to the scene using the appropriate item on the GameObject > 3D Object menu
|
|
|
rozpocznij naukę
|
|
As it stands, a cube isnХt really a very common object in most games but when scaled, it is very useful for walls, posts, boxes, steps and other similar items
|
|
|
rozpocznij naukę
|
|
It is also a handy placeholder object for programmers to use during development when a finished model is not yet available
|
|
|
примерный,предварительный rozpocznij naukę
|
|
For example, a car body can be crudely modelled using an elongated box of roughly the right dimensions
|
|
|
rozpocznij naukę
|
|
For example, a car body can be crudely modelled using an elongated box of roughly the right dimensions
|
|
|
rozpocznij naukę
|
|
For example, a car body can be crudely modelled using an elongated box of roughly the right dimensions
|
|
|
rozpocznij naukę
|
|
Although this is not suitable for the finished game, it is fine as a simple representative object for testing the carХs control code
|
|
|
rozpocznij naukę
|
|
This is a sphere of unit diameter (ie, 0.5 unit radius), textured so that the entire image wraps around once with the top and bottom ТpinchedУ at the poles
|
|
|
rozpocznij naukę
|
|
This is a sphere of unit diameter (ie, 0.5 unit radius), textured so that the entire image wraps around once with the top and bottom ТpinchedУ at the poles
|
|
|
rozpocznij naukę
|
|
Spheres are obviously useful for representing balls, planets and projectiles but a semi-transparent sphere can also make a nice GUI device for representing the radius of an effect
|
|
|
rozpocznij naukę
|
|
Spheres are obviously useful for representing balls, planets and projectiles but a semi-transparent sphere can also make a nice GUI device for representing the radius of an effect
|
|
|
rozpocznij naukę
|
|
Spheres are obviously useful for representing balls, planets and projectiles but a semi-transparent sphere can also make a nice GUI device for representing the radius of an effect
|
|
|
rozpocznij naukę
|
|
A capsule is a cylinder with hemispherical caps at the ends
|
|
|
rozpocznij naukę
|
|
A capsule is a cylinder with hemispherical caps at the ends
|
|
|
rozpocznij naukę
|
|
It is textured so that the image wraps around exactly once, pinched at each hemisphereХs apex
|
|
|
rozpocznij naukę
|
|
While there arenХt many real world objects with this shape, the capsule is a useful placeholder for prototyping. In particular, the physics of a rounded object are sometimes better than those of a box for certain tasks
|
|
|
rozpocznij naukę
|
|
This is a simple cylinder which is two units high and one unit in diameter, textured so that the image wraps once around the tube shape of the body but also appears separately in the two flat, circular ends
|
|
|
rozpocznij naukę
|
|
Cylinders are very handy for creating posts, rods and wheels but you should note that the shape of the collider is actually a capsule (there is no primitive cylinder collider in Unity).
|
|
|
rozpocznij naukę
|
|
This is a flat square with edges ten units long oriented in the XZ plane of the local coordinate space. It is textured so that the whole image appears exactly once within the square
|
|
|
rozpocznij naukę
|
|
A surface is also needed sometimes for showing images or movies in GUI and special effects
|
|
|
rozpocznij naukę
|
|
Although a plane can be used for things like this, the simpler quad primitive is often a more natural fit to the task
|
|
|
rozpocznij naukę
|
|
A quad is useful in cases where a scene object must be used simply as a display screen for an image or movie
|
|
|
rozpocznij naukę
|
|
Simple GUI and information displays can be implemented with quads, as can particles, sprites and ТimpostorУ images that substitute for solid objects viewed at a distance
|
|
|
rozpocznij naukę
|
|
You can use this Capsule as a placeholder for various elements in your scene, such as an obstacle, prop, or as a stand-in for a character
|
|
|
имеющий определЮнную форму rozpocznij naukę
|
|
The Isometric Diamond 2D primitive is a white diamond-shaped Sprite that is 1 x 0.5 units in size
|
|
|
rozpocznij naukę
|
|
The pixels at the top and bottom of this Sprite are slightly cropped to improve tiling
|
|
|
rozpocznij naukę
|
|
The pixels at the top and bottom of this Sprite are slightly cropped to improve tiling
|
|
|
rozpocznij naukę
|
|
The Hexagon Flat-Top 2D primitive is a regular hexagon that is 1 unit wide, oriented with its sides to the top and bottom
|
|
|
rozpocznij naukę
|
|
In technical terms, any script you make compiles as a type of component, so the Unity Editor treats your script like a built-in component
|
|
|
rozpocznij naukę
|
|
You define the members of the script to be exposed in the Inspector, and the Editor executes whatever functionality youХve written
|
|
|
приводить в действие,включать rozpocznij naukę
|
|
|
|
|
rozpocznij naukę
|
|
To do this, navigate to the Inspector and uncheck the checkbox next to the GameObjectХs name (see image below), or use the SetActive method in script
|
|
|
rozpocznij naukę
|
|
They ensure you donХt need to manually add GameObjects to a scriptХs exposed properties using drag and drop, thereby saving time when you are using the same script code in multiple GameObjects
|
|
|
rozpocznij naukę
|
|
They need to work out whether the player is interacting with an enemy, a prop, or a collectable, for example
|
|
|
rozpocznij naukę
|
|
You can use the GameObject. FindWithTag() function to find a GameObject by setting it to look for any object that contains the Tag you want
|
|
|
rozpocznij naukę
|
|
This means that Unity can save on runtime calculations, and potentially improve performance
|
|
|
rozpocznij naukę
|
|
Including a GameObject in the precomputations for a system that does not need to know about that GameObject can result in wasted calculations, unnecessarily large data files, or unexpected behavior
|
|
|
включать,заключать в себе rozpocznij naukę
|
|
It comprises a checkbox, which sets the value to Everything or Nothing, and a drop-down menu that lets you choose which values to include
|
|
|
rozpocznij naukę
|
|
These calculations take place while precomputing lighting data at bake time
|
|
|
rozpocznij naukę
|
|
See Immediate saving, below, for more details
|
|
|
rozpocznij naukę
|
|
UnityХs Prefab system allows you to create, configure, and store a GameObject complete with all its components, property values, and child GameObjects as a reusable Asset
|
|
|
rozpocznij naukę
|
|
Any edits that you make to a Prefab Asset are automatically reflected in the instances of that Prefab, allowing you to easily make broad changes across your whole Project without having to repeatedly make the same edit to every copy of the Asset
|
|
|
rozpocznij naukę
|
|
You can nest Prefabs inside other Prefabs to create complex hierarchies of objects that are easy to edit at multiple levels
|
|
|
rozpocznij naukę
|
|
You can nest Prefabs inside other Prefabs to create complex hierarchies of objects that are easy to edit at multiple levels
|
|
|
rozpocznij naukę
|
|
However, this does not mean all Prefab instances have to be identical
|
|
|
rozpocznij naukę
|
|
You can also create variants of Prefabs which allow you to group a set of overrides together into a meaningful variation of a Prefab
|
|
|
rozpocznij naukę
|
|
Projectiles - for example a pirateХs cannon might instantiate a cannonball Prefab each time it is fired
|
|
|
rozpocznij naukę
|
|
This process of creating the Prefab Asset also turns the original GameObject into a Prefab instance
|
|
|
rozpocznij naukę
|
|
It is now an instance of the newly created Prefab Asset
|
|
|
сохранЯть,оберегать,хранить rozpocznij naukę
|
|
If you are replacing an existing Prefab, Unity tries to preserve references to the Prefab itself and the individual parts of the Prefab such as child GameObjects and Components
|
|
|
rozpocznij naukę
|
|
Also note: You may encounter a similar problem in the case of preserving references to existing Components when you save over an existing Prefab, if a single GameObject within the Prefab has more than one of the same Component type attached
|
|
|
относитьсЯ,иметь отношение rozpocznij naukę
|
|
In isolation: When you edit a Prefab in isolation, Unity hides the rest of your current working Scene, and you only see the GameObjects that relate to the Prefab itself (plus, optionally, a pre-set editing environment - see below).
|
|
|
отделЯть,разделЯть,отличать rozpocznij naukę
|
|
By default, Unity displays the visual representation of the context in gray scale to visually distinguish it from the Prefab contents you edit
|
|
|
rozpocznij naukę
|
|
This is so you can focus on editing your Prefab without accidentally selecting other unrelated GameObjects, and without having a cluttered Hierarchy window
|
|
|
rozpocznij naukę
|
|
However, when you move GameObjects around that are part of the Prefab contents, you can use the snapping features in Unity to snap to GameObjects in the context, provided the context is not set to Hidden
|
|
|
rozpocznij naukę
|
|
Apart from the root Transform properties, you can also override other properties of a Prefab instance, which might drastically change its appearance compared to the Prefab Asset itХs an instance of
|
|
|
rozpocznij naukę
|
|
Apart from the root Transform properties, you can also override other properties of a Prefab instance, which might drastically change its appearance compared to the Prefab Asset itХs an instance of
|
|
|
rozpocznij naukę
|
|
For example, if you open Prefab Mode in Context via a Prefab instance in a Scene, then you can see the surroundings in that Scene while you edit the Prefab.
|
|
|
rozpocznij naukę
|
|
This allows you to edit your Prefab against a backdrop of your choosing rather than an empty Scene
|
|
|
rozpocznij naukę
|
|
Select a message to display its entire text in the detail area
|
|
|
rozpocznij naukę
|
|
|
|
|
rozpocznij naukę
|
|
A package is a container that stores various types of features or assets, such as:
|
|
|
rozpocznij naukę
|
|
A package is a container that stores various types of features or assets, such as:
|
|
|
rozpocznij naukę
|
|
Project templates to share common project types with others
|
|
|
rozpocznij naukę
|
|
Packages deliver a wide range of enhancements to Unity through the Package Manager
|
|
|
rozpocznij naukę
|
|
Packages deliver a wide range of enhancements to Unity through the Package Manager
|
|
|
список,составлЯьть список rozpocznij naukę
|
|
View samples to see how to query the package registry, install, embed, and remove packages, and list packages using a variety of criteria
|
|
|
rozpocznij naukę
|
|
Learn about the file that the Unity Package Manager reads so it can compute a list of packages to retrieve and load
|
|
|
rozpocznij naukę
|
|
Use this registry server to host and distribute (or consume) custom packages, in addition to the registry that Unity provides
|
|
|
rozpocznij naukę
|
|
Learn the principles and features of the Package Manager, including concepts like versions, manifests, registries, states, sources, the package lifecycle, and dependency and resolution
|
|
|
rozpocznij naukę
|
|
|
|
|
rozpocznij naukę
|
|
Learn how to set up or access a custom registry server
|
|
|
rozpocznij naukę
|
|
Learn how the Package Manager determines the direct and indirect dependencies of a project and evaluates all the requested package versions before retrieving the best version from the registry
|
|
|
rozpocznij naukę
|
|
Match a symptom to a possible solution if any of your projectХs packages, including the Package Manager window itself, fails to load
|
|
|
rozpocznij naukę
|
|
Match a symptom to a possible solution if any of your projectХs packages, including the Package Manager window itself, fails to load
|
|
|
rozpocznij naukę
|
|
This section explains many of the concepts surrounding the Unity Package Manager functionality
|
|
|
rozpocznij naukę
|
|
This section explains many of the concepts surrounding the Unity Package Manager functionality:
|
|
|
rozpocznij naukę
|
|
A change in package version tells you whether it contains a breaking change (major), new backward-compatible functionality (minor), or bug fixes only (patch), following Semantic Versioning.
|
|
|
rozpocznij naukę
|
|
A change in package version tells you whether it contains a breaking change (major), new backward-compatible functionality (minor), or bug fixes only (patch), following Semantic Versioning.
|
|
|
rozpocznij naukę
|
|
In the domain of UnityХs Package Manager, a package registry is a server that stores package contents and information (metadata) on each package version
|
|
|
rozpocznij naukę
|
|
Unity maintains a central registry of official packages that are available for distribution
|
|
|
rozpocznij naukę
|
|
It reads your project manifest and fetches package contents and metadata.
|
|
|
rozpocznij naukę
|
|
Once installed in a project, Unity treats package assets just like any other asset in the project, except that these assets are stored inside the package folder and are immutable
|
|
|
rozpocznij naukę
|
|
When you select a folder from the list, Unity shows its contents in the pane to the right
|
|
|