예제 #1
0
 protected virtual void Init(Dictionary <Renderer, GlowObject> list)
 {
     if (glowTarget == GlowTarget.Self)
     {
         return;
     }
     Renderer[] rs = gameObject.GetComponentsInChildren <Renderer>();
     if (rs == null)
     {
         return;
     }
     foreach (Renderer r in rs)
     {
         GlowMono m = r.gameObject.AddComponent <GlowMono>();
         m.obj  = this;
         m.list = list;
         ms.Add(m);
     }
 }
예제 #2
0
        protected override void Init(Dictionary <Renderer, GlowObject> list)
        {
            Transform SkinDataObj = transform.Find("SkinDataObj");

            {
                MeshRenderer[] rs = gameObject.GetComponentsInChildren <MeshRenderer>();
                if (rs == null)
                {
                    return;
                }
                foreach (MeshRenderer r in rs)
                {
                    if (SkinDataObj && r.transform.IsChildOf(SkinDataObj))
                    {
                        continue;
                    }
                    GlowMono m = r.gameObject.AddComponent <GlowMono>();
                    m.obj  = this;
                    m.list = list;
                    ms.Add(m);
                }
            }
            {
                SkinnedMeshRenderer[] rs = gameObject.GetComponentsInChildren <SkinnedMeshRenderer>();
                if (rs == null)
                {
                    return;
                }
                foreach (SkinnedMeshRenderer r in rs)
                {
                    if (SkinDataObj && r.transform.IsChildOf(SkinDataObj))
                    {
                        continue;
                    }
                    GlowMono m = r.gameObject.AddComponent <GlowMono>();
                    m.obj  = this;
                    m.list = list;
                    ms.Add(m);
                }
            }
        }