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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Add comment