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
- [Android]Resources fail to load when the AAB build contains a large Addressables Bundle
- Unity is loading internal version of SharpZipLib instead of local version
- The Context Menu items are ordered incorrectly
- Audio Mixer does not change volume when lowering volume on an Audio Mixer loaded from AssetBundles
- Error “Value cannot be null. Parameter name: key UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)” thrown and Addressables build fails when "Include in Build" is disabled and using Addressables For Android package
Add comment