Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annoying warning for [ExecuteInEditMode] #180

Closed
Smileynator opened this issue Dec 1, 2021 · 3 comments
Closed

Annoying warning for [ExecuteInEditMode] #180

Smileynator opened this issue Dec 1, 2021 · 3 comments
Assignees
Labels
bug Something isn't working released

Comments

@Smileynator
Copy link

If you have UI particles in a prefab, and have the prefab open when going into playmode (so the editor is in prefab edit mode) it will pop up warning called "Risk of Unwanted modifications", warning how having it open might cause issues.

The solution, is to either fix the code to be ok with it, or let unity know that prefab mode is fine (nothing breaks) by using [ExecuteAlways] instead. This in turn will make the warning go away.

@Smileynator Smileynator added the bug Something isn't working label Dec 1, 2021
@Tyrannicus100BC
Copy link

Huge +1 for this one and seems like a pretty simple change. We're considering bring this package into our project as source just so we can make this one line change.

Is there a drawback to just replacing the annotation with [ExecuteAlways]?

@Smileynator
Copy link
Author

Is there a drawback to just replacing the annotation with [ExecuteAlways]?

It depends on the editor only code. It might cause unexpected behavior (like saving state of the particle system that is not intended to save because of prefab mode) details are not privy to me though. Totally depends on this package's codebase.

github-actions bot pushed a commit that referenced this issue Feb 17, 2022
## [3.3.10](3.3.9...3.3.10) (2022-02-17)

### Bug Fixes

* annoying warning for [ExecuteInEditMode] ([b6b2c72](b6b2c72)), closes [#180](#180)
* PrefabStageUtility class is not experimental after 2021.2 ([0fd5d7a](0fd5d7a))
@github-actions
Copy link

🎉 This issue has been resolved in version 3.3.10 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

LionelPerrault added a commit to LionelPerrault/Unity-Particle that referenced this issue Jul 25, 2023
## [3.3.10](mob-sakai/ParticleEffectForUGUI@3.3.9...3.3.10) (2022-02-17)

### Bug Fixes

* annoying warning for [ExecuteInEditMode] ([b6b2c72](mob-sakai/ParticleEffectForUGUI@b6b2c72)), closes [#180](mob-sakai/ParticleEffectForUGUI#180)
* PrefabStageUtility class is not experimental after 2021.2 ([0fd5d7a](mob-sakai/ParticleEffectForUGUI@0fd5d7a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

3 participants