Conditional attribute and #ifdef
drdavient opened this issue · 2 comments
drdavient commented
Great looking Singleton!
Please excuse my ignorance here, but I'm wondering why you need both the Conditional attribute and the #if defined clause. They seem to replicate one another. I'd love to know :)
cheers
Dave
```
[Conditional("UNITY_EDITOR")]
public static void AddToPreloadedAssets(this ScriptableObject scriptableObject) {
#if UNITY_EDITOR
https://github.com/jedybg/yaSingleton/blob/afad14d55d759369bb957fc49d8c1ed375ed31d0/Helpers/ScriptableObjectExtensions.cs#L9
heyJordanParker commented
Heyo,
It shouldn't be the case, yes, I vaguely remember some issues with Android builds. I'll do some testing & remove the preprocessor directive if it works properly on a more recent version of Unity. The conditional is much cleaner (and takes care of the actual references to the method).
Cheers,
Jordan
drdavient commented
Cool, it was the first time I'd seen that conditional myself and will
switch to using it in future :)
D. E. Cooper PhD
库柏大卫博士
+44 77 6156 4320
http://drdavient.com
http://playblockships.com
…On Mon, 15 Mar 2021, 15:11 Jordan Georgiev, ***@***.***> wrote:
Heyo,
It shouldn't be the case, yes, I vaguely remember some issues with Android
builds. I'll do some testing & remove the preprocessor directive if it
works properly on a more recent version of Unity. The conditional is much
cleaner (and takes care of the actual references to the method).
Cheers,
Jordan
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBGMOEL6OQNHNPKVNK4SS3TDYPTPANCNFSM4ZGDJTPA>
.