Search Issue Tracker

Duplicate

Votes

0

Found in

4.6.1p2

Issue ID

661511

Regression

No

Unity crashes when text serializing a field named "Base"

Serialization

-

Steps:
1) Create a new Unity project
1a) Go to Editor settings, change Serialization Mode to "Force Text"
2) Save the scene, name it anything
3) Create a new C# file, name it "Dummy"
4) Edit Dummy.cs like this:

[System.Serializable]
class Dummy {
public string Foo;
}

5) Create a new C# file, name it "CrashUnity"
6) Edit CrashUnity.cs like this:
class CrashUnity: MonoBehaviour {
public Dummy Base; // NAME IS IMPORTANT
}

7) Create a new gameObject in the scene, name irrelevant
8) Attach CrashUnity.cs to the new gameobject
9) Click on the new gameobject and save the scene.
10) (EXPECTED) Unity does not crash. GameObject shows a "Base" field which allows one to edit "Foo".
10) (OBSERVED) Unity crashes.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.