It seems that what you are wanting to know here is what it is that gives life meaning. To answer that, I think it should first be clarified that there is a difference between subjective meaning and objective meaning.
Regarding subjective meaning, a person may, by definition, choose any criteria they wish when determining what gives life meaning to them. If you choose happiness as the primary criteria, then if you are happy, you might say that your life has meaning, as it is fulfilling the purpose that you have chosen for it. If you stipulate that the happiness must be a justified rationally, then it must be justified in order for your life to have meaning to you. In the subjective sense, I cannot answer that question for you. Only you can answer your question.
You might also decide that you base your subjective meaning upon something outside of yourself, such as cultural standards. So, if a specific culture says that your life has meaning, or that you should use some specific standard for meaning, then that would be your subjective standard.
However, in the subjective sense, as you can see, meaning can shift depending on your mood or thoughts at the moment, and certainly it can change as your personality changes over time or as the surrounding culture changes.
Indeed, many people choose subjective standards such as this when determining whether a life or their life has meaning, and it is not uncommon for that to lead to shifts in how meaningful we see our lives over time as well as shifts in goals. For instance, during times of depression, we might decide that your life has no meaning, or perhaps during a mid-life crisis you could determine that your life only has meaning if you obtain some previously unrecognized goal.
What if your personal subjective standard of meaning is to align your meaning with an objective standard? It seems that you, as many people do, intuitively feel that there should be some objective standard of meaning by which you should or could measure your life, such that you couldn't just make it up on a whim. If that is the case, you are looking for an objective standard for meaning.
In order for there to be objective meaning, there would necessarily need to be some ontological and objective meaning giver. This would have to be some immutable force outside of the control of you or society which has set the meaning of life. Such a thing could not be a material thing as material things don't provide "oughts" or meaning. So, you are intuitively seeking some non-material agent, or what might be called a supernatural force.
Many belief systems, both theistic and non-theistic, attempt to provide some sort of answer to the meaning of life and include such non-material forces. So, the answer to objectively whether happiness from illusions is sufficient to give life meaning, you would need to consult your belief system. Because this is one of the most primary necessities of a belief system, if your belief system does not satisfactorily address this issue, such as tacking on a belief about the meaning of life ad hoc, it may be a reason to question its validity and explore alternate belief systems.
That being said, some have concluded from their belief system that there is no objective meaning to life. This leads to a belief that life itself is absurd, or at least when it comes to us attempting to find meaning. To take that line of thought would lead you squarely into Existentialism which attempts to address that issue, and that field is vast with many competing suggestions on how to resolve the matter.