using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class CreateStaticObjID : MonoBehaviour { public static long staticGameObjID = 0; private void Awake() { if (!this.gameObject.GetComponent()) { var UIdSysterm = this.gameObject.AddComponent(); UIdSysterm.ReassignId((ulong)CurrentUserInfo.mySelf.Id,true); } staticGameObjID = (long)GetComponent().Id; EntitiesManager.Instance.AddEntity(staticGameObjID, gameObject); GetComponent().SetGameObjID(staticGameObjID); } // Use this for initialization void Start () { } // Update is called once per frame void Update () { } }