找回密碼
 注冊帳號

掃一掃,訪問微社區

application.absoluteurl 絕對url

2014-12-31 07:14| 發布者: 楊炎| 查看: 2318| 評論: 0|原作者: 蠻牛|來自: unity3d腳本manual

摘要: application.absoluteurl 絕對urlstatic varabsoluteurl: stringdescription描述the absolute path to the web player data file (read only).到web播放器數據文件夾的絕對路徑(只讀)。application.absoluteurland ...

application.absoluteurl 絕對url

static varabsoluteurl: string

description描述

the absolute path to the web player data file (read only).

到web播放器數據文件夾的絕對路徑(只讀)。

application.absoluteurlandapplication.srcvalueallow you to detect if your unityweb data file was moved to another location or is being linked to. you might want to protect against both to prevent piracy of your data files.

application.absoluteurl 和application.srcvalue允許你檢測unityweb數據文件是否被移動或鏈接接到其他位置。你也許想保護這兩者來防止盜用數據文件的行為。

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

void start() {

bool ispirated = false;

if (application.iswebplayer) {

if (application.srcvalue != "game.unity3d")

ispirated = true;

if (string.compare(application.absoluteurl, "http://www.website.com/game/game.unity3d", true) != 0)

ispirated = true;

if (ispirated)

print("pirated web player");

}

}

}

// this detects if your data files were moved to another server

// 檢測你的數據文件是否被移動到其他的服務器

// or are being linked to from somewhere else.

// 或是被鏈接到其他地方

function start () {

var ispirated : boolean = false;

if (application.iswebplayer) {

if (application.srcvalue != "game.unity3d")

ispirated = true;

if (string.compare (application.absoluteurl, "http://www.website.com/game/game.unity3d", true) != 0)

ispirated = true;

if (ispirated)

print("pirated web player");

}

}

文章點評
女校游泳队彩金 新手玩股票怎么开户 福建十一选五彩票app 武汉麻将红中赖子皮 黑龙江11选5正规 特级毛片WWW 上海11选5每期推荐 有没有好玩的游戏棋牌 湖北快3开奖结累 幸运11选开奖结果走势图 股票配资平台代理佣金再多少 极速赛车开奖官网168 江西多乐彩11选5开奖公告 大庆52麻将下载安装 浙江11选5任五遗漏 黑龙江p62开奖结果 网上干什么能挣钱