Hey guys,
I've created an action that lets you set the antialiasing level of your game, even at runtime!
// (c) Copyright HutongGames, LLC 2010-2012. All rights reserved.
using UnityEngine;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.RenderSettings)]
[Tooltip("Sets the antialiasing level.")]
public class SetAntialiasingLevel : FsmStateAction
{
[RequiredField]
[Tooltip("AntiAliasing filter can be set to either 0,2,4 or 8. This coresponds to the number of multisamples used per pixel.")]
public FsmInt antialiasingLevel;
public override void Reset()
{
antialiasingLevel = 0;
}
public override void OnEnter()
{
DoSetantialiasingLevel();
}
public override void OnUpdate()
{
DoSetantialiasingLevel();
}
void DoSetantialiasingLevel()
{
QualitySettings.antiAliasing = antialiasingLevel.Value;
}
}
}
Let me know how it goes :-)
Simon