Practical Unity3d Foot Bank

Source: Internet
Author: User

1. Switch checkpoints

void Ongui () {  
    ...  
    Application.loadlevel ("Scenename");  
}  
Here Scenename, is your level scene name, such as in the selection level scene, similar to Angry Birds level choice. Click on the button to enter the appropriate level  
/NOTE: The level needs to be authorized in Fiile->build Settings->add Current, not authorized to switch the level.

2. Screen Cutting

void Ongui () {  
    ...  
    Application.capturescreenshot ("FileName");  
}  
In the game if there is a screen sharing function, will greatly increase the stickiness of the game, plus this sentence  
is OK//filename is saved file name, if you want to make SD card path, we have to add SD card path

3, open the URL

void Ongui () {  
    ...  
    Application.openurl ("http://www.YOURURL.com");  
}  
In the game to open the Help file, the game home page, is to use this sentence  
//url can also be a local HTML file, the local address of course is not the beginning of HTTP

4. Quit the game

Application.Quit ();  
A word can quit the game, convenient not  
//someone will ask, Android if the corresponding back key. It's easy to refer to the AdMob method, the C # script calls the Android Java function, and don't forget to  
import the eclipse-generated jar file.

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/extra/

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.