I am trying to make a list of "tiles". For this I defined a class named "Tile":
[System.Serializable]
class Tile
{
[SerializeField]
GameObject platform;
[SerializeField]
List<string> connectionNorth,
connectionSouth,
connectionWest,
connectionEast;
}
[SerializeField]
List<Tile> tiles = new List<Tile>();
Now...If I find the GameObject that is stored in the field platform
(does not matter how I find it, with a raycast, collision, trigger...etc.) How do I access it's parent class (the instance of the class that this specific gameobject is stored in, during runtime)?. By doing this I want to compare ,let say connectionNorth
list with some other list I have.