Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
5
Question by ina · Dec 29, 2010 at 12:48 AM · meshproceduralmeshfiltersharedmesh

sharedMesh - what is the mesh shared with?

The Manual is not clear on the difference between .mesh and .sharedMesh - other than that the latter should be read-only... What is the sharedMesh shared with?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
10
Best Answer

Answer by Jessy · Dec 29, 2010 at 01:08 AM

Let's say you have a whole bunch of the same non-skinned* object on-screen. All the objects could use the same mesh. But as soon as you do anything to modify MeshFilter.mesh, on one of them, the mesh gets instanced, allowing for that object to have changes applied, while the others stay the same. This allows for you to make changes to a saved mesh, in-game, without having to save a whole bunch of similar meshes with the scene. If you make changes to MeshFilter.sharedMesh, however, every object will have the same changes applied. Each of these variables can be very handy if you're making use of prefabs.

Also, if you procedurally create your own mesh, and save it in the Assets folder, the changes you make to a "sharedMesh" will be persistent. This doesn't happen with meshes in FBX files, which will be reset at some later point, after modification. I honestly don't know the rules regarding the timing of the FBX resetting, but regardless, it's not useful unless you're in Play mode.

*For whatever reason, you can't instance a skinned mesh in this fashion.

Comment
Add comment · Show 6 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ina · Dec 29, 2010 at 02:16 AM 0
Share

So, shared$$anonymous$$esh is kind of like a prefab for mesh...

avatar image ina · Dec 29, 2010 at 02:21 AM 0
Share

Also, I am not sure what the caveat mentioned in the shared$$anonymous$$esh manual page refers to, "Also, be aware that is not possible to undo the changes done to this mesh." ... as long as you cache the changes to the mesh, you should be able to revert, right?

avatar image Jessy · Dec 29, 2010 at 02:52 AM 0
Share

Yes, but that's not "undo", in the sense of the Edit menu type of thing. Also, as far as I can tell, that warning is basically a lie. Even just saving a scene or restarting Unity will revert the mesh back to its originally-imported state, in my experience.

avatar image ina · Dec 30, 2010 at 07:54 AM 1
Share

I just found out what they meant by no-undo on mesh.. If you edit a shared$$anonymous$$esh procedurally, it'd apply the changes permanently to your scene object!!! Replacing the .mesh in paintvertices.js procedural example with .shared$$anonymous$$esh i found that after pressing play, the changes remain!! I saved the scene, restarted, and my sphere is this still this deformed paintvertices ugly sculpted thing!!!

avatar image Jessy · Dec 30, 2010 at 04:02 PM 0
Share

Are you just using the default Unity sphere? That would make sense, because it doesn't have an FBX file to reference.

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

difference between sharedMesh and Mesh 1 Answer

Procedural Mesh problem from Editor Window 1 Answer

Shared Meshes, do they auto-update? 0 Answers

Procedurally generated mesh not Rendering all triangles 1 Answer

Generate a highpoly sphere with mesh collider procedurally 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges