Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
5
Question by jjobby · Oct 08, 2010 at 01:52 AM · errorprefabbugserializedproperty

Prefab SerializedProperty weird error, bug?

I've created game object using prefab. Normally, when you change value of variable in that object. That variable will show as a bold character in the inspector to indicate that this variable is changed and may have different value from prefab. You can reset the variable by right click and choose revert value to prefab. That variable will be reset and will show as normal character again (not bold).

My problem is that, sometimes, the character of those variables have changed back to normal (not bold) even if there values are different from prefab. I don't know what the causes but when I tried to use revert value to prefab in the inspector. Unity reported error log like this.

Using a SerializedProperty after the object has been deleted is not possible. UnityEditor.SerializedProperty:set_prefabOverride(Boolean) UnityEditor.EditorGUI:SetPrefabOverride(Object, String[], Int32) (at E:\BuildAgent\work\68355d6e5d19d587\Editor\Mono\Generated\EditorGUI.cs:2813)

[....\Editor\Src\Utility\SerializedProperty.cpp line 1118] (Filename: E:/BuildAgent/work/68355d6e5d19d587/Editor/Mono/Generated/EditorGUI.cs Line: 2813)

What happens after that is all other variables in my object has been reverted to prefab too. I have to manually set each value again. And if I change value in prefab then the prefab will revert all values in all objects which derived from it. Ugh! That's really a pain. What really strange is that even if I open the backup of my project. This problem is still not disappear. All of those changed variables are still not in bold. I need to manually change all variables to make them show as a bold character again. So, that I can properly use prefab in my project. After this, if I play the simulation in editor again. Unity will give another error log.

NullReferenceException at (wrapper managed-to-native) UnityEngine.Transform:INTERNAL_get_position (UnityEngine.Vector3&)

at UnityEngine.Transform.get_position () [0x00000] in E:\BuildAgent\work\68355d6e5d19d587\Runtime\Export\Generated\BaseClass.cs:768

at PlayerAI.DistanceToBallVector () [0x00000] in C:\Documents and Settings\Joybook S41 Series\My Documents\Soccer Simulation\Assets\Scripts\PlayerAI.cs:1113

at PlayerAI.IsBallInKickRange () [0x00000] in C:\Documents and Settings\Joybook S41 Series\My Documents\Soccer Simulation\Assets\Scripts\PlayerAI.cs:1090

at PlayerAI.IsControlBall () [0x00000] in C:\Documents and Settings\Joybook S41 Series\My Documents\Soccer Simulation\Assets\Scripts\PlayerAI.cs:1074

at SoccerTeam.IsTeamControlBall () [0x00009] in C:\Documents and Settings\Joybook S41 Series\My Documents\Soccer Simulation\Assets\Scripts\SoccerTeam.cs:989

at SoccerTeam+c_Iterator10.MoveNext () [0x00021] in C:\Documents and Settings\Joybook S41 Series\My Documents\Soccer Simulation\Assets\Scripts\SoccerTeam.cs:511 UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator) UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) (at E:\BuildAgent\work\68355d6e5d19d587\Runtime\Export\Generated\BaseClass.cs:1064) c_IteratorE:MoveNext() (at Assets\Scripts\SoccerTeam.cs:449)
(Filename: Assets/Scripts/PlayerAI.cs Line: 1113)

If I get the first error, this second error will always occur when I start the simulation. After this error, everything is working fine again. There is no error log anymore until my prefab is acting weird again. I'm not sure how to reproduce this problem. All I did is just play/stop the simulation as usual. But sometimes this problem occurs after I stop the simulation. And I've to redone all above processes again. I've encountered this problems three times now since I use Unity3. What's the cause of this problem and how to prevent it?

Comment
Add comment · Show 2
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 Walt D · Dec 29, 2010 at 07:07 PM 0
Share

I'm having this same exact problem. Happens with just about every Unity project I work on. Dunno what I'm doing wrong, if anything.

avatar image Wes 1 · Jan 02, 2011 at 07:37 PM 0
Share

I have the same problem, you ever figure it out?

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by PanicMode · Dec 28, 2010 at 06:12 AM

I've got the same thing going on with mine. I'm thinking it's definitely something wrong with the editor itself. Btw, I'm using Vista x64. I dunno if that's the problem or not, but what are you using?

Comment
Add comment · 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
0

Answer by Wolfram · Apr 19, 2012 at 05:59 PM

I have never seen these error messages, but we had numerous occurences of this bug in our project. I was able to write a script that automatically fixes these cases:

http://forum.unity3d.com/threads/132489-Resetting-PrefabOverride-Flags-for-Instantiated-Prefabs-in-3.4.x?p=897802&viewfull=1#post897802

Comment
Add comment · 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

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.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

Assertion failed on expression: 0 Answers

Distance betwen two objects.Error,bug,etc. 2 Answers

The file 'MemoryStream' is corrupted! 6 Answers

Hi,a Problem When I Save a Prefab 0 Answers

Unity White Screen Problem 2 Answers


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