heyJordanParker / yaSingleton

A singleton pattern implementation for Unity3d. Based on ScriptableObjects instead of the conventional MonoBehaviour approach.
MIT License
162 stars 10 forks source link

yaSingleton doesn't work with Play Mode Options enabled #8

Open michalkluz opened 1 year ago

michalkluz commented 1 year ago

Hey, I'd like to use yaSingleton in my project but it seems that it doesn't load if the Play Mode Options are enabled. The singleton asset behaves like it doesn't exist. As soon as I turn off the Play Mode Options, it starts behaving properly. I'd love to use both Play Mode Options enabled and yaSingleton in one project, is there a way to do it?

heyJordanParker commented 1 year ago

Hey ho,

It doesn't sound like a great idea to use scriptable objects and not reload the domain (I assume that's why you want to enable the play mode, to make this faster).

The results can be quite wild.

But if you want, feel free to debug this and post a pull request – I'll approve it to the main repository ❤️

Cheers, Jordan

On Fri, Mar 17, 2023 at 4:59 PM michalkluz @.***> wrote:

Hey, I'd like to use yaSingleton in my project but it seems that it doesn't load if the Play Mode Options are enabled. The singleton asset behaves like it doesn't exist. As soon as I turn off the Play Mode Options, it starts behaving properly. I'd love to use both Play Mode Options enabled and yaSingleton in one project, is there a way to do it?

— Reply to this email directly, view it on GitHub https://github.com/neverproductive/yaSingleton/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZIS7654ZJDJFNPMT2RJ5LW4R34DANCNFSM6AAAAAAV6UO2QI . You are receiving this because you are subscribed to this thread.Message ID: @.***>