//Initialize void Init() { if(guideUIRoot == null) { GameObject tmpObj = Resources.Load(guideUIRootPath) as GameObject; if(tmpObj != null) { guideUIRoot = GameObject.Instantiate(tmpObj) as GameObject; if(guideUIRoot != null) { guideCamera = guideUIRoot.GetComponent<GuideCamera>(); } } } }
// Use this for initialization void Start() { mini = Camera.main.GetComponent <GuideCamera>(); heroScreenPos = Camera.main.WorldToScreenPoint(GameObject.FindGameObjectWithTag("Player").transform.position); }