With Unity 5.2p1, the API for BaseMeshEffect has changed yet again, this time requiring us to implement
public abstract void ModifyMesh (VertexHelper vh);
The previous method that took a Mesh is still there, too:
public virtual void ModifyMesh (Mesh mesh);
(which was much nicer to work with and more efficient for our use cases).
Is this API stable now? We’re changing all of our code for the 3rd or 4th time to account for this API changing so frequently. Can we please implore you great folks at UT to settle on a direction here and stick with it? We can adapt to whatever direction you need to go, but it has been changing so often that it has become really painful to upgrade Unity versions. Do we think this new API is “the one” for a while, or should we expect more changes here soon?
Also, is there any longer any point in overriding the method takes a Mesh? Since the one that takes a VertexHelper is abstract we’re stuck having to override that guy, so why is the other one still there? Also, are there any code samples for how to properly use this new version that takes VertexHelper? We are clearing it and re-adding the stream on every frame which sounds wasteful. Are we supposed to somehow keep that “stream” from one frame to the next? And what is stream-oriented about it, anyway? It’s exposed as a simple List to us.
From my knowledge this is stable now (at least i dont know of any plans to change it again). the version that takes a Mesh is actually marked as Obsolete so although its still there i wouldn’t use it.
I don’t mind the changes, but you could at least update the documentation to reflect the changes.
I tried looking for help in the repo at Bitbucket, but the BaseMeshEffect file in the 5.2 branch still accepts Mesh as parameter for ModifyMesh(). How come the changes aren’t visible in the repo?
We dont push changes to the repo for patch releases. Each merge is a very manual process and we would rather spend the time fixing bugs then doings a merge.
As for the documentation it should have been updated but i’ll double check that.
Glad I’m not the only one disoriented by this. We’re in the middle of transitioning a project from 5.1 to 5.2, I already had to rewrite some text gradient stuff which was based on this classic example -
Just installed 5.2.1p1 and hit the same issue.
Does anybody have a nice little example of the equivalent using ModifyMesh (VertexHelper vh)? The docs on this seem really poor.
I’m basically just trying to re-implement the font gradient example (above link) as a start.
Could there be at least a way to access the mesh inside the vertex helper?
Because some of us don’t need vertex helper, because our mesh is already
in the memory so why use another CPU cycles to recreate something which already
is a mesh…