Hi everybody,
I’ve been searching a lot about this issue. I have two scripts LevelContent.cs (Scriptable object) and Manager.cs.
LevelContent.cs
public class LevelContent: ScriptableObject
{
[HideInInspector]
[SerializeField]
public GameObject general_background;
}
}
Manager.cs
public class LevelContent: ScriptableObject
{
public LevelContent content;
}
(Code for reference)
I have a manager in my scene and one scriptable object asset, and that asset is attached to the Manager’s public variable “content”.
In editor it does works awesome, building for iOS & Android it goes well too.
My issue is that attachement crashes in some devices (I’ve tested it on Android 5.5 and crashes). There’s no log, no errors, no messages, anything… the app just close as if I pressed home button.
I know that the issue is specifically the attachement (reference) because when I deattach the “content” asset (leave the LevelContent content empty or null), the app goes awesome.
I might not say that the issue is in older devices because in my published app I got reviews from Android 7 or 9 having the same problem that the app just close.
I tried to load the scriptable object from Resources folder trying to find if the attachement is the problem, no matter where or how do I load the reference, I have the problem. Just by having the reference, the app crashes.
I can say that I see this issue in 10% of the whole users.
I tested in some devices: Note 8, S8, A8, iPhone 6 & XR, and some Huawei devices with no problem.
I’m using Unity 2019.4.4f LTS and I just upgraded it to 2019.4.13f LTS.
Any ideas?