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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Add comment