playMaker

Author Topic: Readonly attribute  (Read 1112 times)

rogermr

  • Playmaker Newbie
  • *
  • Posts: 4
Readonly attribute
« on: September 07, 2022, 05:58:56 AM »
Hi there!

There seems to be a [Readonly] attribute but it doesn't seem to work.. I can't find any reference on the API, which makes me think this is obsolete. Is there anyway to do things readonly *without* having to do a CustomActionEditor? I haven't seen a way to do our own Attributes either..

Thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Readonly attribute
« Reply #1 on: September 08, 2022, 01:58:10 AM »
Hi.
for playmaker actions i don't think you need ready only for exposed fsm variables
As if your variable is an output (result) then you can add
Code: [Select]
[UIHint(UIHint.Variable)]
and if its an input that can not be changed , it does not need to be shown in the action.

if you need to know what value it has you could add it to the tooltip text.

rogermr

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Readonly attribute
« Reply #2 on: September 16, 2022, 05:55:40 AM »
Hi!

I can think of many situation were readonly on an action is actually helpful.
In our case we're actually using it already using our own custom editor on specific actions, but it would be very convinient to have the actual tag (that is already in the API....) to be working, so we don't need to create/update custom editors for all the actions.

As far as I know, Tooltip is not really an options since you can't pass a method to it, needs to be a constant expression...

Thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Readonly attribute
« Reply #3 on: September 18, 2022, 04:10:43 PM »
Hi.
maybe you can use the :

public override string ErrorCheck()

you can find a sample here