Exemplo n.º 1
0
        void Start()
        {
            if (m_isFxMakerEditor)
            {
                m_rootObj  = this.gameObject.transform.root.gameObject;
                m_aimPoint = null;

                Transform[] childs = m_rootObj.GetComponentsInChildren <Transform>();
                foreach (Transform child in childs)
                {
                    if (child.name.Equals(m_attachPointEnum.ToString()))
                    {
                        m_aimPoint = child;
                        break;
                    }
                }
            }
        }