Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
3
Question by tmdchi · Apr 05, 2013 at 10:57 AM · runtimedecalssharedmeshreadable

How to make a combined mesh readable, or access the original sharedMesh?

I'm trying to use Edelweiss' Decal System, which, in order to create decals in runtime (bullet impacts and such), needs to read the data of the mesh it's being projected on.

The problem is that, when using the Unity's Static Batching feature, all static meshes (sharedMesh from MeshFilter) in the scene become a runtime generated combined mesh, which apparently is not readable, and thus, not usable by the Decal System mesh generator.

I'd like to use the very useful batching feature and at the same time be able to create decals.

A possible solution would be to use the sharedMesh from the MeshCollider, but of course I'm not using a MeshCollider everywhere.

Thanks in advance!

Comment
Add comment · Show 2
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 tmdchi · Apr 08, 2013 at 11:03 AM 0
Share

Absence of answers means it's not possible? Or am I posing it wrongly?

avatar image IMD · Jan 26, 2015 at 04:13 PM 0
Share

Hey! Any work around here tmdchi? I'm procedurally generating a lot of meshes which require lots of combining for a decent fps, but also later I require those meshes to be exported as obj files.

Like you I currently can't read the combined meshes, and have no ideas about how to read them now, apart from duplicating each one and only combining the child meshes of one of the pairs.

An interesting fact is I am still able to read the combined meshes via Editor scripts such as a standard obj exporter editor script.

Isaac

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by dgoyette · Jun 20, 2018 at 05:30 PM

This is a very old post, but it's the first result I found in Google when researching a similar issue I was having. In my case, I have a script that does some interesting visual effects which rely on accesses in the mesh of an object. This script wasn't working on Static objects, because the MeshFilter's mesh was a Combined Mesh by the time Start() was executed on mys script.

Anyway, what worked for me was to move my code from Start() to Awake(). It seems that the Mesh isn't combined yet in Awake, but is combined by the time Start is called.

This is under Unity 2018.1.

Comment
Add comment · Show 2 · 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 BorisOkunskiy · Jun 28, 2018 at 11:32 AM 0
Share

Very good advice, thank you!

avatar image dgoyette · Jun 28, 2018 at 01:56 PM 0
Share

Actually, scratch that! It appears that the above statement is correct when run in Unity's editor, but it is NOT true when run as part of a build. It's possibly bug-related, but this is discussed more on the forums: https://forum.unity.com/posts/3544143/

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

13 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Create / Modify Texture2D to Read/Write Enabled at Runtime 3 Answers

Export objects to a .3DS file at runtime 1 Answer

Lens Flares shines through (maya)-object geometry.. 1 Answer

Bake Ambient Occlusion in Unity at Runtime 1 Answer

drawing spheres at runtime 1 Answer


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