Example #1
0
        /// <summary>
        /// 收集挂载点信息
        /// </summary>
        /// <param name="rootRenderNode"></param>
        /// <returns></returns>
        public int GatherRenderNodeInfo(GameObject rootRenderNode)
        {
            if (null == rootRenderNode)
            {
                return(0);
            }
            List <Transform> lst = new List <Transform>();

            UnityTools.FindAllTransform(rootRenderNode.transform, lst);
            int count = 0;

            foreach (var t in lst)
            {
                this.renderNodeObjects[t.name] = t.gameObject;
                if (t.name == "dummy_left_weapon_at" || t.name == "dummy_right_weapon_at" ||
                    t.name == "dummy_left_shield_at")
                {
                    bindNodeTable[t.name] = t;
                }
                ++count;
            }
            bindNodeTable["self"]       = Transform;
            bindNodeTable["rendernode"] = rootRenderNode.transform;
            return(count);
        }