Beispiel #1
0
        public void InitObject(GameObject gameObject, object data = null)
        {
            this.gameObject = gameObject;
            id = IdUtil.Generate();
            AutoReference();
            GameObject childGameObject = new GameObject(GetType().FullName);

            childGameObject.transform.SetParent(gameObject.transform);
            childGameObject.transform.localPosition = Vector3.zero;
            childGameObject.transform.localRotation = Quaternion.identity;
            childGameObject.transform.localScale    = Vector3.one;
            lccView           = childGameObject.AddComponent <LccView>();
            lccView.className = GetType().Name;
            lccView.type      = this;
            InitData(data);
            ObjectBaseEventSystem.Instance.Register(this);
        }