Playmaker Forum

PlayMaker Feedback => Feature Requests => Topic started by: imtrobin on July 04, 2014, 05:35:20 AM

Title: Get Current State as enum, not string
Post by: imtrobin on July 04, 2014, 05:35:20 AM
Hi

Currently, there is a ActiveStateName to get current state. Can I request for a index based into the FSMState. This way, I can build the names via at runtime if I need, and I don't suffer the penalty of string slowness.
Title: Re: Get Current State as enum, not string
Post by: jeanfabre on August 18, 2014, 04:19:48 AM
Hi,

 Have you noticed performances because of the use of strings? If you do, it's important to pin point exactly the problem as it may not be because of string themselves. If you already profiled, can you share your findings? maybe there are things to improve in custom actions.

 Bye,

 Jean
Title: Re: Get Current State as enum, not string
Post by: imtrobin on August 18, 2014, 02:21:03 PM
Not profiled yet on current game, but on previous games. strings in c# generate garbage, and of course is a lot slower in comparision. When I have a lot of characters calling GetCurrentState every update, it will be slow, especially on mobile. If I can optimize it now with enum, I would do so.
Title: Re: Get Current State as enum, not string
Post by: jeanfabre on September 08, 2014, 08:03:53 AM
Hi,

 with the coming up new release of PlayMaker and its support for enum, this will be possible then yes :)

 Bye,

 Jean