valax321 / meshsprites Goto Github PK
View Code? Open in Web Editor NEWMesh sprites for Unity supporting 3d lighting.
License: MIT License
Mesh sprites for Unity supporting 3d lighting.
License: MIT License
When using the asset, the console is regularly filled with this message whenever OnValidate is called from an instance of MeshSprite:
SendMessage cannot be called during Awake, CheckConsistency, or OnValidate
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Valax321.MeshSprites.MeshSprite:GenerateMeshForSprite (UnityEngine.MeshFilter,UnityEngine.Sprite) (at Assets/Plugins/MeshSprites-1.0.0/Runtime/MeshSprite.cs:184)
Valax321.MeshSprites.MeshSprite:OnValidate () (at Assets/Plugins/MeshSprites-1.0.0/Runtime/MeshSprite.cs:124)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
Upon doing some research, it seems this error is caused by editing certain fields in OnValidate that trigger behaviour when edited - in this case the sharedMesh of the object's MeshFilter.
This may be due to the MeshFilter triggering some behaviour on its corresponding MeshRenderer, using SendMessage as the medium.
According to Unity, SendMessage related behaviour may fail if done from within OnValidate, so this may be a fundamental issue that underlies other issues such as #1, #3 and #4
When using CTRL-D to duplicate a GameObject with a MeshSprite component, the clone functions fine but the Mesh Filter in the original is now missing, and will stay missing (even through Undos) until one of its fields are changed (presumably calling OnValidate?)
In the project browser, when a prefab with an attached MeshSprite is selected but not yet opened, the preview in the project browser will rapidly refresh and flicker as the console is filled with the following warning:
SendMessage cannot be called during Awake, CheckConsistency, or OnValidate
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Valax321.MeshSprites.MeshSprite:GenerateMeshForSprite (UnityEngine.MeshFilter,UnityEngine.Sprite) (at Assets/Plugins/MeshSprites-1.0.0/Runtime/MeshSprite.cs:184)
Valax321.MeshSprites.MeshSprite:OnValidate () (at Assets/Plugins/MeshSprites-1.0.0/Runtime/MeshSprite.cs:124)
UnityEditor.EditorApplication:Internal_CallUpdateFunction
This occurs with enough frequency that the engine slows down, and clicking elsewhere to deselect the prefab takes several seconds to register.
OnValidate seems to be called very rapidly (potentially every editor tick) while a prefab is selected - I'm not sure if this is regular behaviour, or because the MeshSprite script is causing the loop directly.
Potentially related to #3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.