Search Issue Tracker
Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.
Postponed
Votes
0
Found in
2017.1.1p3
Issue ID
954079
Regression
No
NavMeshAgent.SetAreaCosts are being reset on Play mode
To reproduce:
1. Download attached project "Source.zip" and open in Unity
2. Open "Lobby" scene
3. Enter Play mode
4. Press "Play and Host"
5. Press "Join"
6. Wait until world was loaded
Expected Result: In the console, you will see these messages:
ScarabGood's areacosts[4] in Spawn() = 1
ScarabGood's areacosts[4] in Start() = 1
Actual Result: In the console, you will see these messages:
ScarabGood's areacosts[4] in Spawn() = 1
ScarabGood's areacosts[4] in Start() = 2
Notes:
- This issue appears on Windows and OSX
- The scarab's area costs should be the same, but they are different in Start for some reason
- The costs are set to 1 in MonsterSpawner.cs after calling Instantiate
- The costs are compared again in Monster.Start, where they are 2 for no reason
- Workaround: If you open the project's MonsterSpawner.cs and move the Warp call above the SetAreaCost call,
then you will see Spawn=1 Start=1 in the console - which is how it should be. So the bug is that SetAreaCost aren't saved before this Warp call there
Reproduced on Unity 5.6.4p1, 2017.1.2p2, 2017.2.0f3, 2017.3.0b6 and 2018.1.0a1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Sprites are cut off when using a custom alpha mask with a custom shader
- Screen.SetResolution() ignores width and height parameters when switching from Fullscreen to Windowed mode
- Crash on il2cpp::vm::Class::Init in the Player when handling FileNotFoundException in cascading catch blocks in async method
- Mesh with vertex animation shader renders incorrectly when using DirectX11 and AMD GPU
- Select Dependencies context menu doesn't work properly in Project Browser
Add comment