UnityEngine.Tilemaps.Tile.GetTileData(UnityEngine.Vector3Int, UnityEngine.Tilemaps.ITilemap, ref UnityEngine.Tilemaps.TileData)

Here are the examples of the csharp api UnityEngine.Tilemaps.Tile.GetTileData(UnityEngine.Vector3Int, UnityEngine.Tilemaps.ITilemap, ref UnityEngine.Tilemaps.TileData) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 View Source File : RandomTile.cs
License : MIT License
Project Creator : azsdaja

public override void GetTileData(Vector3Int location, ITilemap tileMap, ref TileData tileData)
		{
			base.GetTileData(location, tileMap, ref tileData);
			if ((m_Sprites != null) && (m_Sprites.Length > 0))
			{
				long hash = location.x;
				hash = (hash + 0xabcd1234) + (hash << 15);
				hash = (hash + 0x0987efab) ^ (hash >> 11);
				hash ^= location.y;
				hash = (hash + 0x46ac12fd) + (hash << 7);
				hash = (hash + 0xbe9730af) ^ (hash << 11);
				Random.InitState((int)hash);
				tileData.sprite = m_Sprites[(int) (m_Sprites.Length * Random.value)];
			}
		}