Unity3D-RPG Project Practice (4): Role Performance Testing

Source: Internet
Author: User
Tags unity 5
The preface should be learned with a new engine. I remember that when I used Unreal Engine 3 for the project in 2007, I had a painful lesson: I learned about unreal over the past month, and I felt like I had a good idea, so I hurried into the project for formal development, but after several months, I found that many of my first understandings of the engine were wrong. After deciding to use unity3d for the project this time, I think I should be cautious. I should first write some small programs that may be used for fun. Verify your understanding of the engine through practice.
The first is to have no idea about the performance of the mobile platform, which is critical to defining what kind of art technology specifications. So I tried to write a simple role rendering test applet. The complete project resources and source code are here: https://github.com/neil3d/learnunity/tree/master/arttest_char. currently, the role I use is unity 5 beta1. Please master each other.

Notes
Functions implemented by the program
  • A role is displayed on the screen for random standing and walking;
  • Click the screen to place a role on the ground;
  • Drag the screen to move the camera;
  • Displays the current frame rate and the number of generated roles;
Scenario Editing and resource Import
  • Create an empty gameobject named globals to save all global objects, mainly those manager classes;
  • Create a debugger sub-object for globals and mount the script displayed in the test information to it. Use a separate object to enable/disable all debug-related functions;
  • Create an empty gameobject named characters. In the future, all the dynamically generated objects will be set as their sub-objects. Note that the position of its transform should be set to 0;
  • Create a plane, assign a texture, create a ground, and name my ground;
Role animation I use the legacy mode here. It is intuitive and easy to use. Note that the rig option must be set to legacy when importing the skeleton animation model and all actions. After the resources are imported, create a prefab named char, add the skeleton animation model (including the animation settings), and add the charactercontroller script component. Put Char. Prefab in the resources folder to facilitate dynamic creation using the resources. Load () method. The Code logic is first illustrated in the previous figure to illustrate the simple program structure.
  • Applicationmgr class: manages global objects and application settings;
  • Inputmanager: handles all operations here, including mobile camera and click placement role (call the spawncharacter function of charactermgr );
  • Charactermgr: responsible for loading resources when the program starts, mainly Char. perfab; implementing the production role interface and managing role counters;
  • Characterctroroller: controls a single role and implements logoff behavior;

Unity3D-RPG Project Practice (4): Role Performance Testing

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.