Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by ZhootSe · Mar 02, 2016 at 06:30 PM · navmeshtilemaptiles

Id need some help with Navmesh and Tiles

Hey guys!

I'm working on a tiled tycoon game. During most of the development I've been using unitys NavMesh and I used the UnityEditor class to force it to build the navmesh once the tiles are placed in the world. Great! That worked great. However, It's starting to approach where I need to step out of development environment and make the game run on it's own.

That's where I encounter a problem tho. I can easily get the Navmesh to bake on the Tile-prefab I have. However, when I instantiate it and create the world, the Navmesh doesn't appear on any other tiles. I'm not sure how to solve this issue.

Here's a screenshot displaying the issue. P.S. Each tile is made out of a plane. D.S. Screenshot

So far I've thought of two solutions. I'm hoping someone thinks of something better :-)

Solution 1 - Step away from Unity's Navmesh and write my own one. Which is not really a good solution because It'll take a very very long time.

Solution 2 - Create a pre-baked plane which matches the size of the map that's generated. This solution will prevent me from making the map expandable though.

I'd really appreciate if someone could help me out with this issue. :-)

Comment
Add comment
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

1 Reply

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

Answer by Fredex8 · Mar 02, 2016 at 06:47 PM

The navmesh should work fine for your game but not by applying it to individual tiles like that. It's going to result in creating gaps between each tile which are not navigable.

Using a single plane as the navmesh is probably the best solution and there are ways you could make it able to expand still by creating the navmesh at runtime rather than in the editor.

I've yet to get around to trying this but I think that should do what is required here:

NavMeshBuilder.BuildNavMesh

No documentation on that there though so it may take some reading up on.

EDIT: It would appear this still cannot be called at runtime. I thought that had been changed in Unity 5. Apparently it is scheduled for 5.5 https://unity3d.com/unity/roadmap

Even without that there are hacky ways you could do it like having a much larger plain as the navmesh with navmesh obstacles blocking it around the edges and carving it down to size which are then removed to make it larger. Not a good solution but that would work too.

Comment
Add comment · Show 3 · 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 ZhootSe · Mar 02, 2016 at 07:15 PM 0
Share

Yeah. The solution you talk about is what I've been using in the Development $$anonymous$$ode.

Are you 100% sure that I'll be able to call BuildNav$$anonymous$$esh at runtime in version 5.5? In that case I can live with building the game in Development mode until 5.5 is released. Not going to get close to a finished state by June anyway :P

avatar image Fredex8 ZhootSe · Mar 02, 2016 at 09:41 PM 0
Share

Can never be 100% sure of course as there could be delays in the development that push it back to a later version. Also it probably won't be 'BuildNav$$anonymous$$esh' but something else ins$$anonymous$$d.

The description for Bake API sounds like it is talking about building a navmesh at runtime though so personally I'm going to wait until June before I start worrying about building custom navigation options to get around the lack of it currently.

avatar image ZhootSe Fredex8 · Mar 03, 2016 at 01:30 PM 0
Share

Sounds great! Thanks for the information! :-D This allows me to continue working on, the main part is that any builds I have to make before the Baking API becomes available have to be Debug mode.

Thanks for the help!

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

51 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 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

Sprites get horribly cluttered when using Tile palette 1 Answer

My Tile Palette becomes a grey mess 3 Answers

Why does my tile palette look like this ? 0 Answers

Slicing tilesets with different single image size 0 Answers

Tiles Appear All White in Unity Play Mode 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