Created
January 14, 2014 09:58
-
-
Save masayuki5160/8415965 to your computer and use it in GitHub Desktop.
namespaceをつかってファイルをわける。とりあえずよく使うconfig系のファイルだけきりわけたいなと思っただけなんだけど使い方あってるのかな?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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