I\'ve tried to change the image of my object with this code (used as Sprite cast):
GetComponent().sprite = Resources.L
Resources.Load("GameObjects/Tiles/Hole") as Sprite;
You have another "Hole" in your Resources folder. This other-Hole is not a Sprite. Therefore when you use as Sprite it simply can't be casted to one and won't throw an exception (on that line) because:
The as operator is like a cast operation. However, if the conversion isn't possible, as returns null instead of raising an exception.
Resources.Load("GameObjects/Tiles/Hole");
In the working code you specify which file you want, the Sprite, so it finds the correct one.