How to access Plugin Variable in Plugin? I want to access a variable created in Plugin itself. In Craft 2, it could be simply done by craft()-&gt;pluginName-&gt;getVar() but I couldn't find a way in Craft 3. I have tried Craft::$app-&gt;pluginName-&gt;getVar() but that throws an error.
You can access your plugin via

Plugin::getInstance()


You can then access its components defined by setComponents

Plugin::getInstance()-&gt;componentName


Or 

Plugin::getInstance()-&gt;get('componentName')


If you just want to get properties of your main plugin class it's the same way as above. Not sure what you mean exactly by Plugin Variable