Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
6
Question by Waffle Dragon · Mar 10, 2015 at 09:55 AM · unity 5updatenavmeshnavmeshagenttutorial

Survival Shooter Tutorial fix for Unity 5

Hi, I'm trying to do the Survival Shooter tutorial which requires me to download the assets. I understand that the assets are for unity 4.6, so while importing I was asked to update the files to unity 5, so I did.

I then tried running the saved level to see if everything was working, and for the most part it was. I can move, shoot and the sound works but no enemies spawn, they do show up in the hierarchy but not in the scene. I get this warning when playing,

"Failed to create agent because there is no valid NavMesh UnityEngine.Object:Instantiate(Object, Vector3, Quaternion) CompleteProject.EnemyManager:Spawn() (at Assets/_CompletedAssets/Scripts/Managers/EnemyManager.cs:33)"

I also get this error ""SetDestination" can only be called on an active agent that has been placed on a NavMesh. UnityEngine.NavMeshAgent:SetDestination(Vector3) CompleteProject.EnemyMovement:Update() (at Assets/_CompletedAssets/Scripts/Enemy/EnemyMovement.cs:30)"

So the problem is obviously the NavMesh but I don't know how to fix this?

Thanks in advance.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image PsychoRealm · Mar 11, 2015 at 09:32 AM 0
Share

Hi.

I'm actually trying to fix the same issues... I don't find help anywhere so it could be great to have someone who knows what the problem is to help...

Thanks.

4 Replies

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by sonicviz · Mar 11, 2015 at 01:42 PM

"The Survival Shooter was again made in Unity 4 however we are working on a Unity 5 version and hope to have this ready soon. This will either replace or join the current version on the Asset Store."

http://forum.unity3d.com/threads/sample-project-errors-with-unity-5.308784/#post-2010285

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
2

Answer by PsychoRealm · Mar 12, 2015 at 05:51 AM

Hi there!

I found where the problem was coming from. I just had to re-bake my NavMesh for the scene and you should be good to go! Hope that might help you

See ya!

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sonicviz · Mar 12, 2015 at 05:54 AM 0
Share

I did that and it didn't work. The enemies still get all locked up in the doorway even after re-baking the Nav$$anonymous$$esh. Going by the above link @ http://forum.unity3d.com/threads/sample-project-errors-with-unity-5.308784/#post-2010285 it appears to be mesh collider related?

avatar image BTyrande · Apr 30, 2015 at 05:55 AM 0
Share

PsycoRealm how did you done that? I'm a newbie trying to do this.

avatar image
1

Answer by derekda · Aug 04, 2015 at 02:44 PM

I had the same problem, but then realized had left the Game in Play mode while creating all the parts for the Bake. When I did them again not in Play mode, it worked

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Kelvin3d · Aug 18, 2016 at 02:02 PM

Hey guys,

For the Navigation, I guess that we have missed sth. Before clicking the "bake" button, we should choose the environment in Hierarchy first. Otherwise, Unity doesn't know what you want to brake at all. Thus, the enemy is locked up aat doorway. If you choose environment in hierarchy, the rebrake. It works. I hope that this commnet is useful. Thanks.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image n_e_w · Feb 18, 2017 at 01:20 PM 0
Share

@kelvin3d Nope still doesn't work. I can see that the Nav$$anonymous$$esh misses out large areas of the floor. And does not include the spawn points!!!

Any other suggestions?

avatar image MickyP n_e_w · Feb 12, 2018 at 09:17 AM 0
Share

I had a similar problem. But with $$anonymous$$e the Zombunny and Hellephant were moving in a straight line and would not move towards the centre. I played around with Voxel Size in Navmesh bake settings --> Advanced. After increasing the voxel size (for me it seemed to work around 0.08) the Navmesh covered enough of the floor for the enemies to navigate properly.

Note: I have Unity 2017.3 Installed. I'm not sure where Voxel Size would be located in older versions.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

28 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I get NavMeshAgents not to walk through objects? 3 Answers

"SetDestination" can only be called on an active agent that has been placed on a NavMesh. 0 Answers

Nav Agents bumping when on different heights 0 Answers

Navmesh problem with characters rotation in the terrain 1 Answer

All my NavMeshAgents are tilted 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges