View on GitHub

Randomized-Creativity

Collection of random unity snippets

Updating the Editor

[Demo] [Top] [Previous][Next]

To get the editor to show and update the mesh as the user is editing the mesh is a matter of following the editor’s wishes. It might not always be intuitive but luckily stackoverflow and unity’s own forums generally provide the majority of the answers.

Anyway, these are key points:

While it’s understandable that there’s a certain amount of exposure of the underlying implementation details to the user code, the end results feels quite clunky as it adds additional code to the implementation to deal with these implementation details. A post-validate callback could potentially have avoided this overhead.

In any case the end result should show up as shown below.

Two simple runtime generated triangle

The code at this stage will look like the following.

Future references

Marking meshes as dynamic

Credits

Butterfly - Mark Ashkenazi


[Demo] [Top] [Previous][Next]