playMaker

Author Topic: 1.1 Bug - Set GUI Texture Color - Every Frame [FIXED]  (Read 2939 times)

Proton

  • Playmaker Newbie
  • *
  • Posts: 17
    • NPlay
1.1 Bug - Set GUI Texture Color - Every Frame [FIXED]
« on: July 23, 2011, 04:20:12 PM »
'Set GUI Texture Color' is missing the 'Every Frame' option. It does exist on 'Set GUI Texture Alpha'.

Modified class:
Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2011. All rights reserved.

using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.GUIElement)]
[Tooltip("Sets the Color of the GUITexture attached to a Game Object.")]
public class SetGUITextureColor : FsmStateAction
{
[RequiredField]
[CheckForComponent(typeof(GUITexture))]
public FsmOwnerDefault gameObject;
[RequiredField]
public FsmColor color;
public bool everyFrame;

public override void Reset()
{
gameObject = null;
color = Color.white;
everyFrame = false;
}

public override void OnEnter()
{
DoGUITextureColor();

if(!everyFrame)
Finish();
}

public override void OnUpdate()
{
DoGUITextureColor();
}

void DoGUITextureColor()
{
GameObject go = Fsm.GetOwnerDefaultTarget(gameObject);
if (go != null && go.guiTexture != null)
go.guiTexture.color = color.Value;
}
}
}
« Last Edit: November 05, 2011, 05:09:41 PM by alexchouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: 1.1 Bug - Set GUI Texture Color - Every Frame
« Reply #1 on: July 26, 2011, 01:11:07 AM »
Thanks! I'll include this in the next update...

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: 1.1 Bug - Set GUI Texture Color - Every Frame [confirmed]
« Reply #2 on: September 22, 2011, 03:19:27 PM »
Missed this in 1.2, but it's in 1.2.1 now...