Descriptions of fields editable through editor?


Hello, i’ve tried some things and i’ve been able to show private variables in editor by adding [DataMember] on it like this
> [DataMember]

   /// Defines the maximum amount of life 
   private int MaxLife { get; set; }

it correctly appears on the editor, but i’d like to make that the comment appears when i hover the variable, the same way the comment “the priority execution for this script” appears when i hover the priority field of scripts

is it possible ? if yes, how ? it would help a lot to be able to remember which field do what without having to open the script everytime


This has been asked before over on the answers site “How do you add notes on public variables in entity property grids?”.

I am not sure if they ever did make the functionality available as per @Kryptos last comment.


I have tried to use the <userdoc> tag in the balises of the comments, it doesn’t seem to work, so it’s probably not implemented yet.


It is supposed to work already (I updated the answer to give more details). The workflow is not very nice though: every time you modify a comment you need to reload the project. This is because the .usrdoc files are read only once at GameStudio startup.


Thanks a lot !
maybe a future update of the engine could make that the usrdoc files generated by the user would be stored in a specific place and loaded each time there is a change in the code instead of reloading the game studio everytime


I have tried to make it work, it has correctly generated the .usrdoc in the project folder however, even when restarted, xenko doesn’t load the comments


Can you show me what you wrote in the userdoc tag, the content of the generated .usrdoc file and maybe some screenshot in the GameStudio?
I tried today and it worked fine for me.

F:Base.BaseCharacterScript.Name=Write the name of the current Character/Monster/NPC
P:Base.BaseCharacterScript.M_MaxHP=Max HP
P:Base.BaseCharacterScript.M_Animations=Drag an Entity with an animation component on this field

this is the content of the generated userdoc

on gamestudio it doesn’t have any effect it’s like there is absolutely no userdoc


Works fine for me (just tried it 5 min ago). Can you show me your script (code) and a screenshot of the GameStudio where you can mark where you expect the userdoc to show?

Here is my screenshot:



Looks like your solution is not an original .sln created with Xenko. Could it be that the output folder for binaries and xml is not following the normal path?

Can you try with a new project (similar to mine) without messing up with the .csproj or .sln?


i haven’t modified the sln at all, it’s the original sln generated by xenko
but i’ll try with a new project yes


My bad. I was confused by the different name of the solution. But that shouldn’t be a problem.


hm, it seems to work when i do it with the template third person project