Hello all,
I am working on a game for iOS and tvOS and am looking for a way to set some global AC variables depending on the iOS device the player is using. I guess the right way to go would be to use …
https://docs.unity3d.com/ScriptReference/iOS.Device-generation.html
…, but as I am no programmer, I hope to find a clue here how to let AC access this value (maybe even a script example or a link to it).
Thank you so much,
Jensen
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
AC global variables can be manipulated through script - see the Manual's "Variable scripting" chapter, as well as the front page of the scripting guide.
Setting variable values by iOS device, then, is a case of e.g.:
(Where "3" is the ID number of a global Boolean variable)
If you place such code in a new MonoBehaviour script, and place it in your scene, you can then use AC's Object: Call event or Object: Send message Actions to run this "SetVariables" method from an ActionList - if that's necessary.