Understanding of the application of unity in the process of game development and technology

Source: Internet
Author: User
Tags silverlight

On the unity of the description of the process, online already a lot of. I will not do forwarding. In this article I mainly talk about my own understanding of the process.


We know that in a typical UI system, general control drawing needs to be in the UI thread. Includes actions on controls, changes to property values, and so on. Even though there are some UI frameworks that allow you to change property values in a non-UI thread, the framework actually handles message distribution, leaving the drawing messages for non-UI threads to the next frame to draw. (for example, a typical example is the Wpf/silverlight/mfc UI thread is not allowed to manipulate the UI control), which is necessarily a framework for the game engine.


So in our business logic, there has to be a calculation------------"rendering logic, the results of calculations, need to be shown in the next frame or several frames."

Unity provides us with a more user-friendly programming framework for logic to interface rendering, which allows you to take a coroutine, to do a logical operation without blocking the UI, and then allow you to initiate a callback when the UI needs to be refreshed.


So Startcoroutine's input parameter is "a function that returns a value of IEnumerator", and you can get the result in the next update or Ongui function in the unity frame when you return yield.

In fact, it is similar to the Dispatcher.begininvoke in Silverlight. is used to display the logic of the operation to the next frame. Only the framework for the process is more intuitive for programmers.



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.