Howdy

Here's some rustdoc-inspired API documentation for the S&box game engine. It should include all whitelisted APIs, including those in System assemblies. It's buggy and somewhat ugly, but hopefully usable.

Known issues include:

  • Doc XML isn't parsed correctly. If there are any internal links or special tags they won't be rendered.
  • Inheritance and interface implementations are unhandled. Documentation for inherited members isn't found.
  • Extension methods are not handled. They can be found in whatever class they were defined in.
  • Operators and indexers are not handled specially. It would be nice to list them at the start of a type's page.
  • Enums aren't handled. They are treated like structs.
  • Event handlers are ignored entirely.
  • Type names aren't rendered very well. Generic arguments link to the containing generic type. There's no special handling for nullable value types.
  • Some names can overflow their containers.
  • Microsoft maintains alternate, way more verbose doc files for their generator which might be nice to use.
  • The set of assemblies searched was manually compiled, and my hacked half-re-implementation of the whitelist is probably broken in at least a few ways. Some things may be missing.

These pages were generated by MDFL in the Discord. You can yell at me if you want something specific fixed. The documentation itself is authored by Facepunch and Dotnet contributors.


namespace global

This is the top-level namespace.

This namespace contains:

namespace Editor
namespace HalfEdgeMesh
namespace Microsoft
namespace NativeEngine
namespace Sandbox
namespace System
class AliasAttribute Alternate class name(s) for this type to the one specified via LibraryAttribute. This info can then be retrieved via DisplayInfo library.
struct Angles Euler angles. Unlike a Rotation, Euler angles can represent multiple revolutions (rotations) around an axis, but suffer from issues like gimbal lock and lack of a defined "up" vector. Use Rotation for most cases.
struct BBox An Axis Aligned Bounding Box.
struct Capsule A capsule object, defined by 2 points and a radius. A capsule is a cylinder with round ends (inset half spheres on each end).
class CategoryAttribute Sets the category or the group of a type or a type member. This info can then be retrieved via DisplayInfo library.
class ClassNameAttribute Set the class name for this type or member. This info can then be retrieved via DisplayInfo library.
struct Color Represents a color using 4 floats (rgba), with 0-1 range.
struct Color.Rgba16
struct Color32 A 32bit color, commonly used by things like vertex buffers. The functionality on this is purposely left minimal so we're encouraged to use the regular struct.
struct ColorHsv A color in Hue-Saturation-Value/Brightness format.
class ConditionalVisibilityAttribute Hide a property if a condition matches.
class DefaultValueAttribute Sometimes with CodeGen we want reflection to be able to get the original initial value of a property (which is set with {get;set;} = initialvalue;). For this reason sometimes we'll drop this attribute on that property. You might want to use this manually for instances where codegen can't define the default value. This will usually happen for structs like vector and color.. if the default value isn't defined as a number or string.
class DescriptionAttribute Sets the description of a type or a type member. This attribute is usually applied automatically by codegen based on the XML comment of the type or member. This info can then be retrieved via DisplayInfo library.
class EditorAttribute Tell the tools or gameui property editor which editor we should be using for this property or type.
class EditorModelAttribute Declare a model to represent this entity in editor. This is a common attribute so it's leaked out of the Editor namespace.
class GroupAttribute Sets the category or the group of a type or a type member. This info can then be retrieved via DisplayInfo library.
class HideIfAttribute Hide this property if a given property within the same class has the given value. Used typically in the Editor Inspector.
class HideInEditorAttribute Hide this in tools/editors.
class IconAttribute Sets the icon of a type or a type member. Colors are expected in HTML formats, like "rgb(255,255,255)" or "#FFFFFF". This info can then be retrieved via DisplayInfo library.
struct Line Represents a line in 3D space.
struct Matrix Represents a 4x4 matrix.
class MinMaxAttribute Mark property as having a minimum and maximum value.
class OrderAttribute Visual order of this member for UI purposes. This info can then be retrieved via DisplayInfo library.
class PlaceholderAttribute Add placeholder text, typically displayed for string properties when the text entry field is empty. This info can then be retrieved via DisplayInfo library.
struct RangedFloat A float between two values, which can be randomized or fixed.
struct RangedFloat.RangeType Range type of .
struct Ray A struct describing an origin and direction
struct Rotation Represents a Quaternion rotation. Can be interpreted as a direction unit vector (x,y,z) + rotation around the direction vector (w) which represents the up direction. Unlike , this cannot store multiple revolutions around an axis.
class SandboxSystemExtensions
class SandboxSystemExtensions
class ShowIfAttribute Show this property if a given property within the same class has the given value. Used typically in the Editor Inspector.
class SpawnableAttribute This entity is expected to be spawnable in-game, like from Sandbox's spawnmenu.
class TagAttribute Adds a single or multiple tags for this type or member. Tags can then be retrieved via DisplayInfo library.
class TemporaryEffect Destroys a GameObject after a number of seconds. If the GameObject or its children have any components that implement ITemporaryEffect we will wait for those to be finished before destroying. This is particularly useful if you want to delete a GameObject but want to wait for sounds or particles to conclude.
class TimeRangeAttribute For use with Curves, allows you to define a custom range for the time
class TitleAttribute Sets the title or a "nice name" of a type or a type member. This info can then be retrieved via DisplayInfo library.
class ToggleGroupAttribute Very much like a GroupAttribute, except we're indicating that the group can be toggle on and off using the named property
struct Transform A struct containing a position, rotation and scale. This is commonly used in engine to describe entity position, bone position and scene object position.
class ValueRangeAttribute For use with Curves, allows you to define a custom range for the value
struct Vector2 A 2-dimensional vector. Typically represents a position or size in 2D space.
struct Vector2Int
struct Vector3 A point in 3D space.
struct Vector3.SmoothDamped Everything you need to smooth damp a Vector3. Just call Update every frame.
struct Vector3.SpringDamped Everything you need to create a springy Vector3
struct Vector3Int
struct Vector4 A 4-dimensional vector/point.