Does anyone know how to safely store and retrieve a pointer stored in Node Var, I tried it didn’t work out well. First I set the node var
Sprite* sprt = ... ;
myNode->SetVar("Sprite", sprt);
then I tried to retrieve it like this
Sprite* mySprite = static_cast<Sprite*>(myNode->GetVar("Sprite")->GetPtr();
but it throws up some ugly compiler error.
I would be glad if anyone that has gotten this kind of stuff right can show me the way forward