What is _v2 package?

Sorry if I’m repeating the common question, but I failed to find answer here.

So what is the _v2 package?
What should I use in projects: openfl.display or openfl._v2.display?

The _v2 package contains the previous version, you shouldn’t use it directly,
it’s choosen automatically depending on the target, or if you force -Dopenfl-next or -Dopenfl-legacy.


In OpenFL, we began to move away from distinct “OpenFL native”, “OpenFL HTML5” libraries, in order to unify the project. Going one step further, “next” is literally one set of classes. For compatibility, and while next develops, we are still keeping the OpenFL 2 native target, but have transitioned Flash and HTML5 to “next” already, as well as some portions of the library. I expect that by the time we are ready for OpenFL 3 (down the road) the v2 code will go away and “next” will be the code for every target by default

1 Like