#If i remove the namespace reference eg
1 messages · Page 1 of 1 (latest)
no suitable method found to override means you have specified an interface on your class, but you have not implemented the interface in your class
yes.
Include the namespace, let it yell that the type cannot be found. Check the Unity console for that error. If there is none, your IDE desynced.
whether or not you derive from tile doesn't matter. if you specify an interface, it must be implemented
Tile specifies the interface. I'm overriding a method in Tile.
hell, it doesn't have to specify the interface, I'm just overriding methods in Tile, as in the example from the Unity docs.
Please verify that it's not a desync issue
I will refresh the code I have on pastebin. There's no complaint about Tilemaps any more. only that Tile methods cannot be found to override.
error:
Assets\BlueprintTile.cs(14,26): error CS0115: 'BlueprintTile.RefreshTile(Vector3Int, ITilemap)': no suitable method found to override
Assets\BlueprintTile.cs(25,26): error CS0115: 'BlueprintTile.GetTileData(Vector3Int, ITilemap, ref TileData)': no suitable method found to override
Tile has those methods, so wtf...
If they're not marked as abstract or virtual they can't be overridden, checking docs...
{
public override void RefreshTile(Vector3Int position, ITilemap tilemap)
{
}
}```
i was able to add this code to my project and it compiles just fine
An example in the docs inherits from TileBase
the example i am using is https://docs.unity3d.com/Manual/Tilemap-ScriptableTiles-Example.html
also thank you all for your help. I'm new to unity after 20 years coding other stuff...
same here! 😄
What Unity version are you on?
2021.3.2f1
i dunno. i feel like if i can add a custom class that inherits from Tile, you have some sort of IDE issue
windows 10
the package isnt installed or something
well it doesn't say Tile doesn't exist, or that tilebase doesn't exist. it's part of the unity manual for this verison...
public class MyTemp : Tile
{
public override void RefreshTile(Vector3Int position, ITilemap tilemap)
{
}
}```
can you add that to an otherwise empty script and see if it compiles?
Override is recognized by VS upon typing override, no compiler errors
Check that you inherit from the right Tile type, do you have your own custom class named the same?
Ugh, I found it. There was another bs test I'd written days ago with a class called Tile, overriding the basic Tile.
the core Tile.
you buy SPR2 a beer 😄