Search Issue Tracker
Fixed in 0.3.0-preview.1
Votes
0
Found in [Package]
early preview
Issue ID
1259823
Regression
No
[NetCode] Generating GhostComponent to Terrain causes error
[NetCode] Generating GhostComponent to Terrain causes error
To reproduce:
1. Open project attached, New Scene.
2. Open Terrain and press "Generate Code".
3. Error fails:
ArgumentException: An item with the same key has already been added. Key: UnityEditor.Experimental.TerrainAPI.PaintHeightTool
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <437ba245d8404784b9fbab9b439ac908>:0)
Unity.NetCode.Editor.GhostAuthoringComponentEditor.GenerateGhost (Unity.NetCode.GhostAuthoringComponent ghostInfo, System.Boolean testOnly) (at Library/PackageCache/com.unity.netcode@0.2.0-preview.5/Editor/GhostAuthoringComponentEditor.cs:453)
Unity.NetCode.Editor.GhostAuthoringComponentEditor.OnInspectorGUI () (at Library/PackageCache/com.unity.netcode@0.2.0-preview.5/Editor/GhostAuthoringComponentEditor.cs:282)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:529)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)
This is reported from:
https://github.com/Unity-Technologies/multiplayer/issues/70
Fixable by changing GhostAuthoringComponentEditor.GenerateGhost method at line 442 to:
if (compType.Type != null && !typeLookup.ContainsKey(compType.Type.FullName))
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- URP Package documentation link in Package manager leads to the deprecated page
- [Usability] No setup script for Render Pipeline Assets for the proper URP Sample usage
- csc.rsp -additionalfile files are not treated as dependencies and are not reloaded when the file contents change
- Error ‘cannot use casts on l-values’ when a variable is assigned inside a second-level nested if statement before being used in a conversion
- "You cannot save to an invalid folder" warning dialog box is shown when canceling Tile Palette creation
Add comment