You can access objects at runtime

(josue) #1

I am interested in the tool, and for my project I 'm doing a rts , similar to warcraft game but I have the following questions.

  • You can access objects at runtime .
  • I create my own tools to interact at runtime .
  • With what format the map is saved, and you can load it at runtime .
  • There is a function that returns the position of the map. ( WorldPositionToMap )

(Leslie Young) #2

The tool is mainly for placing tiles and using your own logic or nevmesh to handle pathing and other info related to the terrain.

None of the TileEd map assets are kept in your scene. I did however place the classes for map data in a runtime side DLL so that you can attach the map data to an object in the scene for runtime use.

Whether you actually need the map data will depend on your game. For most cases a navmesh based navigation system will be best. For a turn based strategy game where units move per tile/ node you might even consider a tiil like my MapNav to handle the underlying grid of nodes rather than trying to associate runtime data with placed tiles. You could use the tiles and just tag them to identify tile types (or change the layers) - these can be set up in the Tile Set data.

But, if you need the TileEd map asset data then simply create a new component and attach that to an object in the scene - maybe on the TileEd Map GameObject in the scene (the one under which all tile objects are placed). In this component you add a property of type TileEdMapAsset and can then drag-and-drop the map asset on there in inspector.

I’ve attached the scripts from the runtime so that you can see how the map data is saved and determine if you would be able to work with that. I made TileEd for editor side tile placement; not to be used as a runtime API. The runtime loading of the map asset is only there for experienced developers who can take scripts and the comments provided in them as documentation and work with that. So if you are not able to understand what is provided and feel the other options I’ve mentioned (tagging tiles or using a grid library) is not what will work for you then rather not grab TileEd since I can not provide coding support on the runtime side. (11.7 KB)

(josue) #3

thanks for the reply , I will review the code sent.

(josue) #4

the asset works on Mac , Windows and Linux ?

(Leslie Young) #5

I dev and test on Windows but it should work on any platform the Unity editor runs on.