[Unity3d] need to understand the basic points of knowledge

Source: Internet
Author: User

1.transform.localposition: The position relative to the parent object. If this object does not have a parent object, then this value is the same as transform.position.
2.transform.localrotation: The amount of rotation relative to the parent object.

3. Similarly, the rationale for Localposition is ibid.

The order in which the self-contained methods are executed in 4.Unity, regardless of where you put them, is performed like this:

Awake->oneable-> Start, fixedupdate-> Update, lateupdate->ongui->ondisable->ondestroy
For the Onenable method: The method is called when the object is enabled or activated.
Awake is called immediately after the Monobehaviour is created, and during the entire life cycle, the awake is executed only once, and if the first object it hangs on is inactive, it will not be called unless the script being hung is inactive (this is done once). And for Onenable, as long as the activation, then is called, repeated activation of repeated calls, not like awake only once (if not to switch scenes under the conditions).
Start () is called after the Monobehaviour is created, before the first execution of the frame update (), and start is executed only when the script instance is enabled and not as onenable as the object activates.
The general development is to get the information of the game object or the script instance in the Awake function, and then make some initialization settings after getting it in the start function.

5.Lightmap (light map), and shadow mapping is a meaning: for a directional light like the sun, a positive projection is required, and a perspective projection is required for the point light source.

6.Specular map (Mirror map): A texture map is required to obtain specular highlights. This requires creating a black-and-white (whatever color you like) texture to define the specular brightness and apply it to every part of the object. The brightness of a specular highlight can be obtained by the brightness of each texture in the image, and each pixel of the mirror map can be displayed as a color vector, such as black for the color vector VEC (0.0f), and Gray to VEC3 (0.5f). In the fragment shader we sample the corresponding color value, multiply it by the specular brightness of the light, the whiter the pixels, the greater the result of the product, the brighter the specular part of the object. )

7.LOD (level of detail detail degree): used to optimize the camera to see objects in the distance to render the object, when there are distant objects in the camera, then you can properly reduce its fineness (that is, to reduce the number of rendering of the patch, you can see unity The documentation for LOD interpretation). This will improve rendering capabilities.

[Unity3d] need to understand the basic points of knowledge

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.