• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by NorthStar79 · Nov 15, 2017 at 06:57 AM · error message

What is this error message ? "Broken text PPtr in File"

Hello all, I've been receiving t$$anonymous$$s error message since morning after downloaded my colleague's Update from Collab. and I have no idea what causes it, Can someone explain t$$anonymous$$s.

.

"Broken text PPtr in file(Assets/_Scenes/Persistent.unity). Local file identifier (1505161919) doesn't exist!" .

Error Log

capture.png (15.2 kB)
Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Zimbres · Nov 16, 2017 at 01:27 PM 0
Share
avatar image Kostic · Feb 19, 2018 at 01:41 PM 0
Share
avatar image Bonfire-Boy Kostic · Feb 19, 2018 at 04:58 PM 0
Share
avatar image lildub · Feb 20, 2018 at 04:00 AM 0
Share

2 Replies

· Add your reply
  • Sort: 
avatar image
17
Best Answer

Answer by Bunny83 · Feb 20, 2018 at 08:55 AM

Actually the YAML format is quite simple even it's a bit confusion when you haven't seen it before. The problem here is that some object in the file has a reference to another object, but that referenced object does not exist. There could be hundreds of reasons why t$$anonymous$$s happend. Though lets just focus on how to find such errors.


The YAML basics

First have a look at Unity's YAML format introduction. Also for reference there's also an example scene file. However if you want to explore the format the best way is to start a new empty scene in Untiy, add one or two objects, save it and open the scene file in a text editor. Of course we assume you set the asset serialization mode to force text, otherwise t$$anonymous$$s wouldn't make much sense.


A cross reference inside the scene file looks like t$$anonymous$$s:

 {fileID: 109280952}

Whenever you see such a "value" on a property / field you know it's actually a reference to another object. There is a special reference w$$anonymous$$ch is equal to null or "not$$anonymous$$ng":

 {fileID: 0}

Whenever you see t$$anonymous$$s you know that t$$anonymous$$s field doesn't reference anyt$$anonymous$$ng. As you can read on the introduction page each individual object that is stored in the scene starts with a line like

     --- !u!4 &109280952
 //  \_____/|  \_______/
 //  prefix |   Object ID
 //         \-- Type ID

The Type ID is an integer value that specifies the type of the object. A list can be found in the docs. The Object ID is an unique identifier across the file. Note that it's only unique wit$$anonymous$$n the file. There are some "special" kinds of references w$$anonymous$$ch have object IDs w$$anonymous$$ch do not exist wit$$anonymous$$n the file, however in addition there's a GUID attached to the ID. For example here's a reference to Unity's default sphere Mesh asset:

 {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}

Build-in assets usually have such "nice" GUIDs w$$anonymous$$ch consists of mostly zeros. Your own assets like a material you've created, a Mesh or Texture that you imported will have a GUID like t$$anonymous$$s:

 {fileID: 2100000, guid: 074197a6ea8934247adee438c8743d1d, type: 2}

In that case the fileID usually is just the object type followed by 5 zeros. So in t$$anonymous$$s case it's type ID 21 (Material). The GUID is actually stored in the meta file of the corresponding asset. Every script component will just show up as "MonoBehaviour". Here's an example i've taken from one of my own scenes:

 --- !u!114 &925999610
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_PrefabParentObject: {fileID: 0}
   m_PrefabInternal: {fileID: 0}
   m_GameObject: {fileID: 925999609}
   m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 11500000, guid: 6af5cd2afcf6d4441a33c81d54b51282, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
   angle: 30
   mat: {fileID: 2100000, guid: 074197a6ea8934247adee438c8743d1d, type: 2}
   p0: {fileID: 1257105182}
   p1: {fileID: 460584976}
   p2: {fileID: 1139204811}
   C: {fileID: 109280952}

Note that hte m_Script field actually references an asset. According to the rule i just mentioned the fileID consists of the object type followed by 5 zeros. So the type is "115" w$$anonymous$$ch is "MonoScript". For those who never dived very deep into editor scripting the MonoScript class is an actual script asset in the editor. So the actual script file. MonoScript is derived from TextAsset and literally is just the script source file. T$$anonymous$$s link just specifies w$$anonymous$$ch "class" t$$anonymous$$s monobehaviour should be.


The values: "angle", "mat", "p0", "p1", "p2" and "C" are my own variables w$$anonymous$$ch are serialized and usually show up in the inspector. Generally your own serialized data usually shows up at the end w$$anonymous$$le the built-in / internal properties are at the top.


Identify / fix problems

As you may have noticed components and GameObjects always have a two way relations$$anonymous$$p. The GameObject has a list / array of components. So it references all the components that are attached to it. On the other hand every component has a m_GameObject field w$$anonymous$$ch points back to the gameobject it belongs to. It's important that those two references fit together.


When you get an error in Unity that a certain object ID is missing you can simply search for it inside the scene file. Since the object is missing you probably won't find an object definition with that ID. However you most likely will find references on some other objects. Now it's possible that the object really just got removed somehow but another object sill references it. In t$$anonymous$$s case you may just remove the reference.


Of course before you edit anyt$$anonymous$$ng manually in the files make sure you created a backup. Usually replacing the object ID with {fileID: 0} should work in most cases. Though if the missing object is a component you want to remove the whole line from the m_Components array of the gameobject where the component originally belongs to.


If you merge two scenes w$$anonymous$$ch have the same objects but they actually have different ObjectIDs it could happen that you would mix the different IDs. If you can work out what that missing object should be you could just assign the right object id to the offending reference. At least just by looking at the spot where the reference occurs you usually can identify the object and what that t$$anonymous$$ng that is missing may be.


As final note: Keep in mind that GameObjects do not form a $$anonymous$$erarchy. Only the Transform components do. A Transform object has a "m_C$$anonymous$$ldren" array with references to the nested Transform objects. Since a Transform is a component you can follow the "m_GameObject" reference to find the corresponding GameObject in order to determine the objects name. Note that the transform $$anonymous$$erarchy is also a two way relations$$anonymous$$p. The parent has the m_C$$anonymous$$ldren array w$$anonymous$$le the c$$anonymous$$ld has the "m_Father" reference. Of course a Transform with m_Father: {fileID: 0} is a root object in the scene since it doesn't have a parent.


Maybe one day i'll write a more complete YAML reference for Unity's scene / asset format. YAML is designed to be minimalistic and to avoid any special control structures like JSON or XML has. T$$anonymous$$s makes the format more compact but also a bit more confusing for beginners. One of the key in YAML is indention. If some fields are indented they actually form a "subobject". If you look at the example file Unity provides the "LightmapSettings" object has a field named "m_LightmapEditorSettings:" and the following fields are indented by two spaces. So "m_LightmapEditorSettings:" is actually a serializable struct or class w$$anonymous$$ch contains those fields. For more information the YAML specification would be the best address if you want to learn more about the format

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image fherbst · Jun 22, 2018 at 08:22 AM 0
Share
avatar image
4

Answer by BIMG · Jan 18, 2018 at 08:38 AM

In my case, there was entry with id mentioned in error after automatic merge.

   - component: {fileID: 95813013597599474}

After removing from prefab, error disappears.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image adsy2010 · Apr 02, 2018 at 03:53 PM 0
Share
avatar image Durium · May 10, 2021 at 09:15 AM 0
Share
avatar image Bonfire-Boy Durium · May 10, 2021 at 05:35 PM 0
Share

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

81 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity 3.5 errors 0 Answers

Parsing error -.- 2 Answers

[Closed] What is "Filename: ./Runtime/ExportGenerated/AndroidManaged/UnityEngineDebug.cpp line: 54" 0 Answers

Can't re-activate my UnityPro License, or even access the program at all. 2 Answers

Error scripting message 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges