Example #1
0
        public void LoadSync()
        {
            if (string.IsNullOrEmpty(modelRes))
            {
                gameObj = new GameObject();
                trans   = gameObj.transform;
            }
            UnityEngine.Object uobj = BundleMgr.Instance.GetAssetSync(modelRes);
            gameObj = GameObject.Instantiate <GameObject>(uobj as GameObject);
#if UNITY_EDITOR
            ApplyShader.CheckShader(gameObj).Start();
#endif
            trans = gameObj.transform;
        }
Example #2
0
        private IEnumerator Instant(ulong gcbId, UObj asset)
        {
            yield return(null);

            GameObject go = null;

            if (null != asset)
            {
                go = Instantiate(asset) as GameObject;
            }
#if UNITY_EDITOR
            ApplyShader.CheckShader(go);
#endif
            FinishInstant(gcbId, go);
        }
Example #3
0
        public static ApplyShader CheckShader(Object o)
        {
            GameObject go = o as GameObject;

            if (null != go)
            {
                ApplyShader comp = go.GetComponent <ApplyShader>();
                if (comp == null)
                {
                    comp = go.AddComponent <ApplyShader>();
                }
                return(comp);
            }
            return(null);
        }
Example #4
0
 void Awake()
 {
     ApplyShader.CheckShader(blurMaterial);
     ApplyShader.CheckShader(UIMaterial);
 }