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

Prefab Mode in Play Mode is not supported #60

Closed
strawlink opened this issue Aug 26, 2019 · 2 comments
Closed

Prefab Mode in Play Mode is not supported #60

strawlink opened this issue Aug 26, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@strawlink
Copy link

Describe the bug
The following message appears when entering play mode while having a prefab open. The prefab edit mode is then stopped and you're thrown back to the scene.

Prefab Mode in Play Mode was blocked by the script 'SoftMaskable' to prevent the script accidentally affecting Play Mode. See the documentation for [ExecuteInEditMode] and [ExecuteAlways] for info on how to make scripts compatible with Prefab Mode during Play Mode.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

To Reproduce

  1. Create a prefab.
  2. Add the SoftMaskable script to any object inside it.
  3. Open the prefab in prefab editing mode.
  4. Start Play-mode.
  5. Observe that prefab editing mode is stopped.

Environment (please complete the following information):

  • Platform: Editor (Windows)
  • Unity: 2019.2.1f1
  • SoftMaskForUGUI: 0.8.1

Additional context
By changing the ExecuteInEditMode attribute to ExecuteAlways, the warning is removed and the Prefab Edit mode stays open - I do not know if there are any unintentional changes due to this, so I figured it was best to make a bug report.

@mob-sakai
Copy link
Owner

Hi @strawlink
Thank you for your reporting!

@mob-sakai mob-sakai added the bug Something isn't working label Aug 26, 2019
@mob-sakai mob-sakai self-assigned this Aug 26, 2019
@AlexD182
Copy link

Repeated in Unity 2020.3.30f1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants