#pastie is hard to read without proper
1 messages · Page 1 of 1 (latest)
just select the language when you paste it . . .
and what is the actual error message/pic you get from unity . . .
ill give you a screen
hm it's hard for me to capture it. on line 51 im trying to access the custom script that is attached to the tile at "currentTile" which is a TileBase Tile (so basically, a type of tile "grass" "water" etc. which exist in the palette. i'm sorry if i'm not explaining it well. but the point is i'm able to grab variables like .Sprite or .color, but I can't get the ones on my custom script
there's no error in unity
hard, how?
because i was trying to take a screenshot of the dropdown window in VS lacking the variables I am looking for lol. so i just used words
anyhoo, you cast currentTile to a Tile, so it only has (and can access) members from Tile . . .
oh, one sec
it doesn't know anything about CustomTile bc it's not that type . . .
CustomTile, the child, derives from Tile, the parent . . .
use CustomTile where you need to access that type's members: public fields, methods, etc. . . .
I think I understand but 1 sec
bingo that worked
!!!!
thank you very much
I think the other person probably mentioned it but I forgot 😐
so much to learn. time to add casting to the list. ok thanks again
np . . .
hm, actually it is giving me another issue that i don't quite understand...
never mind i think i fixed it
are you still there? i'm having another issue w/ the casting I think. error is on line 34 http://pastie.org/p/21enawNGynKeDQAIVyvCWL and http://pastie.org/p/35Gsx703Bk2ZBxK50PYDBy and probably irrelevant but just in case http://pastie.org/p/4sF5iUo9jFHp9zstMfbDNU