我要加入

UNITY3D聖殿-自由的遊戲設計天堂

會長:stormcorn / stormcorn開設日:2013-03-21 18:05:22

  • EXP

  • 資金24353  
  • 招募制度:自由加入制
  • 成員:1738 人
  • 昨日人氣:0

過關更換場景數值存取

推上精選編輯

近期編輯:robertx ...看更多

/*
開啟Unity->在assets視窗右鍵->創建C# script文件->命名為"MyStatic"->寫入以下內容
*/
using UnityEngine;
using System.Collections;

public class MyStatic : MonoBehaviour {
    public static int aaa = 0;
}
/*
之後別支腳本只要用MyStatic.aaa就可以存取此數值
例如     MyStatic.aaa += 100;
*/

公會首頁

主選單
關聯資料

目前沒有資料連到「過關更換場景數值存取」。