The use of "my" denotes it's not a "global" variable, thus a lexical/local variable.
I'm not sure what you're trying to do exactly bud, but, that said, guessing here, you -may- benefit from plugin::SEV and plugin::REV.
aka $entity->SetEntityVariable("variable_name", "value") and $entity->GetEntityVariable("variable_name")
|