throughout my 5 month journey so far i continually heard the advice : DO NOT USE CASTING
and i didnt now trying game save and load "problems" and so far i cant avoid casting …do i want to look for ways around casting in these cases or is it not possible ?
not urgent …thanks
It’s not that simple. There’s casting where is creates no harm whatsoever and is super useful; and there’s unnecessary casting that loads object into memory without you realising it ← that’s the one to be avoided. And it’s not about casting per se, it’s about it creating hard references.
In order to access the save game data, you must load it anyway, so just cast. If you do not want to cast, use an interface. But it’d be more of a convenience thing, to be honest. Also, look into soft references.
only last week i learned why i shouldnt cast .....it was what you said above...100s of Megabytes its crazy but not a problem…fine i`ll cast to load game ( if i must XD )