  In a graph G, the cardinality of the smallest ordered set of vertices that
distinguishes every element of V (G) (resp. E(G)) is called the vertex (resp.
edge) metric dimension of G. In [16] it was shown that both vertex and edge
metric dimension of a unicyclic graph G always take values from just two
explicitly given consecutive integers that are derived from the structure of
the graph. A natural problem that arises is to determine under what conditions
these dimensions take each of the two possible values. In this paper for each
of these two metric dimensions we characterize three graph configurations and
prove that it takes the greater of the two possible values if and only if the
graph contains at least one of these configurations. One of these
configurations is the same for both dimensions, while the other two are
specific for each of them. This enables us to establish the exact value of the
metric dimensions for a unicyclic graph and also to characterize when each of
these two dimensions is greater than the other one.
