|
I'm wondering if it's possible to change the position of mesh vertices in the editor. Here's my current code:
Unity complains: "Instantiating mesh due to calling MeshFilter.mesh during edit mode. This will leak meshes. Please use MeshFilter.sharedMesh instead." But using sharedMesh wouldn't make a lot of sense, either.
(comments are locked)
|
|
Actually you do have to do what Unity says and use sharedMesh. Otherwise, as it says, you'd leak meshes since they would only exist in the scene and not the project. Here is an editor script that makes custom planes, which uses sharedMesh. If it needs to be unique you can make a new mesh. do you know if a box collider can be used for a plane generated using that script? http://answers.unity3d.com/questions/33818/box-collider-on-a-default-plane
Dec 30 '10 at 12:37 AM
ina
You can use any collider on any object.
Dec 30 '10 at 02:13 AM
Eric5h5
You can also give it a meshcollider and feed it the mesh you just created. AddComponent(MeshCollider).sharedMesh = mesh;
Apr 05 '11 at 10:04 PM
HarvesteR
(comments are locked)
|
|
Here is my code for accessing/creating meshes at runtime or edit mode.
(comments are locked)
|
