This paper deals with the existence of multiple solutions for the quasilinear equation{-\operatorname{div}\mathbf{A}(x,\nabla u)+|u|^{\alpha(x)-2}u=f(x,u)\quad\text% {in ${\mathbb{R}^{N}}$,}}which involves a general variable exponent elliptic operator{\mathbf{A}}in divergence form. The problem corresponds to double phase anisotropic phenomena, in the sense that the differential operator has various types of behavior like{|\xi|^{q(x)-2}\xi}for small{|\xi|}and like{|\xi|^{p(x)-2}\xi}for large{|\xi|}, where{1<\alpha(\,\cdot\,)\leq p(\,\cdot\,)<q(\,\cdot\,)<N}. Our aim is to approach variationally the problem by using the tools of critical points theory in generalized Orlicz–Sobolev spaces with variable exponent. Our results extend the previous works [A. Azzollini, P. d’Avenia and A. Pomponio, Quasilinear elliptic equations in\mathbb{R}^{N}via variational methods and Orlicz–Sobolev embeddings, Calc. Var. Partial Differential Equations 49 2014, 1–2, 197–213] and [N. Chorfi and V. D. Rădulescu, Standing wave solutions of a quasilinear degenerate Schrödinger equation with unbounded potential, Electron. J. Qual. Theory Differ. Equ. 2016 2016, Paper No. 37] from cases where the exponentspandqare constant, to the case where{p(\,\cdot\,)}and{q(\,\cdot\,)}are functions. We also substantially weaken some of the hypotheses in these papers and we overcome the lack of compactness by using the weighting method.