Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
0
Question by greay · May 27, 2012 at 09:14 PM · tilemapprocedural

Having trouble getting Tidy Tile Mapper API to generate overhead levels

Has anybody had any luck with this? Setting the growth axis to "BlockMap.GrowthAxis.Forward" seems to generate all the chunks piled on top of each other no matter what I do.

        var blockPrefab:GameObject = Resources.Load("StandardBlock");

     var chunkSize:int = 5;
     this.tileMap = BlockUtilities.CreateBlockMap("tiles", Vector3.one, chunkSize, chunkSize, BlockMap.GrowthAxis.Forward);
     // this.tileMap.transform.position = b.min;
     
     b.size = Vector3(30, 30, 5);
     var block:Block = null;
     for (var x:int = 0; x < b.size.x; x++) {
         for (var y:int = 0; y < b.size.y; y++) {
             for (var z:int = 0; z < b.size.z; z++) {
                 
                 if (TileIsWall(Vector3(b.min.x + x, b.min.y + y, b.min.z + z))) {
                     block = GameObject.Instantiate(blockPrefab).GetComponent(Block);
                     BlockUtilities.AddBlockToMap(this.tileMap, block, false, 0, false, x, y, z, false, true);
                 }
     
             }
         }
     }
     
     var randomiseInitialMap:boolean = false;
     BlockUtilities.RefreshMap(this.tileMap, randomiseInitialMap);

This more or less works if I create the block map setting the growth axis to "Up", but I can't figure out why it won't work the other way. Is it just a bug in Tidy Tile Mapper?

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
0
Best Answer

Answer by biosopher · Nov 16, 2012 at 05:58 PM

I just copied the code from the Runtime API and it worked perfectly after I set the growth axis to forward.

http://api.dopplerinteractive.com/tidy-tile-mapper/runtime-api/blockutilities/addblocktomap

Comment
Add comment · Show 1 · 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 greay · Dec 02, 2012 at 05:50 AM 0
Share

This was actually a bug that has since been fixed. So yeah, the example code does work now.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

how can i make an infinite map using tilemap and also making chunks 0 Answers

Procedural Tilemap Lag 0 Answers

Procedural TileMap generation without creating gameobject per tile. 1 Answer

How do I assign a mesh's UVs so that part of a part of a mesh is one part of the texture and another part of the mesh is another part of the texture 0 Answers

How to build a tilemap at runtime? 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