public WXEntity(GameObject _go, int _arrayId, string _resourcePath) { gameObject = _go; children = new List <WXEntity>(); components = new List <int>(); //arrayId = -1; arrayId = _arrayId; getFileIdAndPrefabInfo(gameObject, _resourcePath); if (fileIdInOriginalSource == -1 || fileIdInOriginalSource == 0) { Debug.LogError("entity localId is 0, can't get entity localId " + gameObject.name); WXUtility.SaveSingleGameObject(gameObject, SceneManager.GetActiveScene()); getFileIdAndPrefabInfo(gameObject, _resourcePath); } }