Skip to content

Instantly share code, notes, and snippets.

@masayuki5160
Created January 14, 2014 09:58
Show Gist options
  • Save masayuki5160/8415965 to your computer and use it in GitHub Desktop.
Save masayuki5160/8415965 to your computer and use it in GitHub Desktop.
namespaceをつかってファイルをわける。とりあえずよく使うconfig系のファイルだけきりわけたいなと思っただけなんだけど使い方あってるのかな?
using UnityEngine;
using System.Collections;
namespace Init {
public static class InitApp {
const string url = "hoge";
public static void Log(){
Debug.Log("test");
}
public static string getBaseURL(){
return url;
}
}
}
using UnityEngine;
using System.Collections;
using Init;
public class TestInitApp : MonoBehaviour {
// Use this for initialization
void Start () {
Init.InitApp.Log();
string url;
url = Init.InitApp.getBaseURL();
Debug.Log(url);
}
// Update is called once per frame
void Update () {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment