Hi,
Following a request, please find a get screensize ratio action ( width/height)
// (c) Copyright HutongGames, LLC 2010-2012. All rights reserved.
using UnityEngine;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Application)]
[Tooltip("Gets the Screen size ratio (width/height).")]
public class GetScreenSizeRatio : FsmStateAction
{
[RequiredField]
[UIHint(UIHint.Variable)]
[Tooltip("The Screen size ratio (width/height).")]
public FsmFloat storeScreenSizeRatio;
public override void Reset()
{
storeScreenSizeRatio = null;
}
public override void OnEnter()
{
storeScreenSizeRatio.Value = 1f*Screen.height/Screen.width;
Finish();
}
}
}
bye,
Jean