question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Introduce Custom Tileset Data Tags

See original GitHub issue

Summary

Right now, there is no builtin way that allows users to specify additional data layers for a Tileset. It would be nice if there was a convenient was to specify data tags for groups of tiles.

Workaround

  • Users can already specify additional data in an array and index it using the tile index.
  • This, however, is not very usable.

Analysis

  • Add an additional TilesetEditorMode where any number of custom data layers can be specified.
  • Each layer, when selected, allows the user to specify a tag object in the Object Inspector.
  • For each layer, the tileset view allows to specify all the tiles that will be tagged.
  • The TilesetCompiler will generate one output layer for each input layer.
  • A Tileset should specify API for conveniently retrieving tags for a tile, or all tiles of a certain tag layer.
  • Note: It might be a good idea to specify that target API first in this case.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:1
  • Comments:20 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
ilexpcommented, Mar 5, 2018

I’m not in the right context to grasp the big picture of your questions right now, but I’ll answer them individually hoping it helps:

Also I dont think I can get the object instance from the MemberInfo alone.

Yep, MemberInfo just describes a type member, not tied to any concrete instance. To get the (Remember: Multi selection!) object instances of a PropertyEditor, use this.GetValue() like here, here or here.

EDIT2: now it seems to be locked to readonly and setting that to false doesnt work??

PropertyEditors are generated recursively. The root editor has a Getter and Setter assigned that retrieve the grids selection directly, and each editor either allows to edit that value directly (primitives, colors, etc.) or generates child editors to edit specific subsets of that value (like properties, fields of an object), which are assigned an anonymous Getter and Setter to retrieve that specific value, or set it. Whenever a PropertyEditor doesn’t have a Setter assigned, it is forced to be readonly - for example when there’s a property without a setter implemented.

Take a look at how PropertyEditors construct child editors. For example, the GameObjectOverviewPropertyEditor generates the shared GameObject “header” editor, and a list of Component editors.

0reactions
Barsonaxcommented, Mar 5, 2018

Tried adding such a property editor but how do I make it actually uses it? Just setting the type doesnt seem to do it.

EDIT: seems to be a priority issue. Raised the priority now it works. EDIT2: now it seems to be locked to readonly and setting that to false doesnt work??

Also I dont think I can get the object instance from the MemberInfo alone. This would mean there is no way to read the list of DataClass instances. I dont know how propertyeditors work exactly so I might be misunderstanding you here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using TileSets - Godot Docs
Assigning custom metadata to the TileSet's tiles¶. You can assign custom data on a per-tile basis using custom data layers. This can be...
Read more >
Custom Properties — Tiled 1.10.2 documentation
Custom properties are displayed in the Properties view. ... Each data type has a “Class” property, which can be used to refer to...
Read more >
Introducing Mapbox Tiling Service - maps for developers
Mapbox Tiling Service (MTS) allows the processing of massive sets of data into custom vector tilesets, continuously updating the maps as the ...
Read more >
Tiles & Tilesets on Stencylpedia
Introduction ; How To: Importing a Tileset; Collision Shapes ... You can tag tiles with textual data that can be accessed during game....
Read more >
Create your first Tile in Wear OS
In this codelab, you'll learn how to create your own Tile for Wear OS. You'll use Tiles Material Components, a library that makes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found