Hi,
im trying to detect on which platform my game is running: ios or Android
i think i need a custom action for this, so i tried a lot, but dont get it to work.
here is the code im using:
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
using UnityEngine;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Device)]
[Tooltip("Set a Bool value if device is iOS or Android")]
public class IphoneBool : FsmStateAction
{
[UIHint(UIHint.Variable)]
[Tooltip("Iphone = True , Android = false")]
public FsmBool deviceIsIos;
public override void OnEnter()
{
if (Application.platform == RuntimePlatform.Android)
{
deviceIsIos = false;
Finish();
}
if(Application.platform == RuntimePlatform.IPhonePlayer)
{
deviceIsIos = true;
Finish();
}
}
}
}
any help greatly appreciated