Exemple #1
0
 private void OnPrefabLoaded(params object[] param)
 {
     UnityEngine.Object @object = param[0] as UnityEngine.Object;
     if (@object != null && this.uicamera != null)
     {
         this.mouseObj = (UnityEngine.Object.Instantiate(@object) as GameObject);
         this.mouseObj.SetActive(false);
         this.mouseObj.name            = "Mouse";
         this.mouseTrans               = this.mouseObj.transform;
         this.mouseTrans.parent        = this.uicamera.transform;
         this.mouseTrans.localScale    = Vector3.one;
         this.mouseTrans.localPosition = Vector3.zero;
         UIPanel component = this.mouseTrans.GetComponent <UIPanel>();
         component.depth = 2000;
     }
     DelegateProxy.UnloadAsset(param);
 }
Exemple #2
0
    void OnPrefabLoaded(params object[] param)
    {
        Object prefab = param[0] as Object;

        if (prefab != null && uicamera != null)
        {
            mouseObj = GameObject.Instantiate(prefab) as GameObject;
            mouseObj.SetActive(false);
            mouseObj.name            = "Mouse";
            mouseTrans               = mouseObj.transform;
            mouseTrans.parent        = uicamera.transform;
            mouseTrans.localScale    = Vector3.one;
            mouseTrans.localPosition = Vector3.zero;

            UIPanel panel = mouseTrans.GetComponent <UIPanel>();
            panel.depth = 2000;
        }
        DelegateProxy.UnloadAsset(param);
    }