private static void ensureInstance() { if(instance == null) { instance = FindObjectOfType( typeof(AdColony) ) as AdColony; if(instance == null) { instance = new GameObject("AdColony").AddComponent<AdColony>(); } } }