I can't seem to have access to Tilemap methods, what am I doing wrong ?
I am new to Unity and C# programming, and I try to make a game with a Tilemap, and when the player puts his mouse over the tiles, I want them to be highlighted, nothing seems to be difficult at this point. But when I programmatically try to use the Tilemap methods, my compiler warns me about non existing methods for Tilemap(SetColor and WorldToCell).
I am currently using Unity 2017.3.1 and Visual Studio.
These are the Tilemap methods I am trying to use :
https://docs.unity3d.com/ScriptReference/Tilemaps.Tilemap.SetColor.html https://docs.unity3d.com/2017.3/Documentation/ScriptReference/GridLayout.WorldToCell.html
These are the errors I get :
'Tilemap' does not contain a definition for 'SetColor' and no extension method 'SetColor' accepting a first argument of type 'Tilemap' could be found (are you missing a using directive or an assembly reference?)
'Tilemap' does not contain a definition for 'WorldToCell' and no extension method 'WorldToCell' accepting a first argument of type 'Tilemap' could be found (are you missing a using directive or an assembly reference?)
If you have an idea why it might do this, don't hesitate.
Can you like your script? Also, do you have using UnityEngine.Tile$$anonymous$$aps
referenced somewhere?
Your answer
Follow this Question
Related Questions
Random.Range method "left-hand side" error 2 Answers
Save game - Tile based game 0 Answers
Move Object around a platform of tiles 0 Answers
Declared variable being returned as null in a method? 0 Answers
How can i pass a method like a parameter Unity3d C#? 3 Answers