Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: HAIRGROW on October 10, 2018, 10:51:19 AM

Title: Get Active State Color [SOLVED]
Post by: HAIRGROW on October 10, 2018, 10:51:19 AM
So I'm working on creating a custom action for debugging purposes. And I'm trying to figure out how to get the color of the Active Fsm State. I'm able to get the name of the Fsm and Active State name, but I'm not seeing a direct way to get the color of the active state. I'm working on a VR game and for debugging purposes, I created an action that set's a Unity Text Mesh to the active state name. The part I'm having problems with is getting the color of the active state in PlayMaker. Essentially I would color code all my states in PlayMaker and set the color of the Unity Text Mesh to the active state color. Thanks in advance.
Title: Re: Get Active State Color [SOLVED]
Post by: HAIRGROW on October 10, 2018, 12:12:38 PM
Never mind. After much tinkering, I figured out that the colors in the Preferences menu are stored in PlayMakerPrefs. So in my custom action, I created an array of those colors from the Preferences and then set my public color value to the index from that array. It works perfectly.