cesium-unity icon indicating copy to clipboard operation
cesium-unity copied to clipboard

More obvious documentation for users

Open j9liu opened this issue 1 year ago • 4 comments

We're getting a lot of questions on the forum about how to do simple things that should be apparent from our public API. We already have XML documentation for all public files and functions, but these comments don't translate to the assembly file, so people don't see it when they use it in their own code. For example, if you write CesiumWgs84Ellipsoid.GetRadii() in your code, there are no comments when you hover over it:

image

There are also no comments when you ctrl-click it:

(This is taken from the forum.)

Is there a way we can make documentation more obvious? Or since we use doxygen for Cesium for Unreal, maybe we can use it here too? Haven't looked into it, but according to this forum thread it works for C#.

j9liu avatar Apr 03 '23 20:04 j9liu

The first step is probably to set the C# compiler option that tells it to generate an XML file with the doc comments at compile time, and put it alongside the built .DLL. Visual Studio should then see that XML file and use it to display Intellisense to the user, as well as (I think) showing doc comments when the user does a "Go to Definition".

In a normal MSBuild project, it's easy to enable this option: https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#generatedocumentationfile

It will be different in Unity, but worst case scenario we should be able to add the appropriate command-line option to the csc.rsp files.

kring avatar Apr 04 '23 01:04 kring

Just wrote up a related issue, #317

Users click on the ? button, goes to a missing page.

csciguy8 avatar May 19 '23 19:05 csciguy8

Hi, I knew it's been two weeks, but I'm a user for the last 3 months (ever since this project came out for unity really) and I didn't even know there was documentation... Where can I find it? I've been pretty much winging it so far, so a doc other than the quick start would actually be great.

AoutoCooper avatar Jun 03 '23 20:06 AoutoCooper

All of the documentation we currently have can be found here: https://cesium.com/learn/unity/

We'll be adding more over time. The best source for learning how to use Cesium for Unity programmatically from C# is to look at the source in this repo, which has extensive documentation on all the classes and methods.

kring avatar Jun 05 '23 09:06 kring