We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

1

I think this is more an opinion-based question but here are my thought (I'm not a C++ expert): Create a base class Tile that will handle generic stuff like rendering, animations if any, behavior of the tile... For each of your special tiles, create a new class that inherits from your base class Tile and override the behavior if your new tile has a custom ...


0

I'd probably use those three variables: Vector2i previousTile Vector2i nextTile float transition Previous and next tile are pretty self explainatory. If player wants to move, nextTile is set to his target coordinates (eg. [2, 1]). Player is in "moving" state if previous and nextTile are different. The "transition" field is used to tell where the player is ...


0

It appears like you are looking at the inspector of one of several subsprites of an image asset you imported with the "Sprite Mode: Multiple" setting and then sliced with the sprite editor. The second screenshot, however, appears to have marked several actual tile images, not the subsprites created from them. It appears like they are using a separate image ...


0

It is an old question - There doesn't still seem to be easy way to show clearly the origin and the bounds of a Tilemap, but it can be solved with a script that runs in the Editor like Philipp said. I created this script. Red border shows the Tilemap current bounds, green cross shows the 0,0,0 position of Tilemap. Script does take into account position of ...


0

using UnityEditor; using UnityEngine; [ExecuteInEditMode] public class GetTilemapCoordinate : MonoBehaviour { public Grid grid; public GetTilemapCoordinate() { SceneView.duringSceneGui += GetMousePosition; } public void GetMousePosition(SceneView scene) { Event e = Event.current; if (e != null) { ...


Top 50 recent answers are included