Giter Club home page Giter Club logo

meshsprites's People

Contributors

valax321 avatar voydvoyd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

meshsprites's Issues

Prefab preview in project browser has correct geometry, but no texture

In the project browser, prefabs with a MeshSprite render a preview of the object (as they have a MeshRenderer). The shape of the mesh is correct and updates as expected, but the preview mesh is untextured. Unsure if this is indicative of an issue or simply a feature that has not been added

image

SendMessage cannot be called during Awake, CheckConsistency, or OnValidate

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

Prefabs with MeshSprite create slowdown when selected in project browser (2019.4.28f1)

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.