Just posting this here for my own sake since i don't like digging through the full api list for the common ones
edit: This was just quickly thrown together in a notepad originally, iv pasted slightly better one that removes ones that arn't as common or working as well as adding some code examples for more complex ones
edit2: went back through and cleaned up this list ordering in a way that makes more sense and removing ones iv since tested and could not determine a change, left some ones i didnt test for the the sake of ~completeness~
Classes
edit: This was just quickly thrown together in a notepad originally, iv pasted slightly better one that removes ones that arn't as common or working as well as adding some code examples for more complex ones
edit2: went back through and cleaned up this list ordering in a way that makes more sense and removing ones iv since tested and could not determine a change, left some ones i didnt test for the the sake of ~completeness~
Classes
[ClassName("")]- Use this for the visible class name[Alias("")]- Provides alternate class names.[Icon("", "#FF0000")]- Sets an icon for display. Colors in HTML format.[Library("")]- Marks a class for library registration.
Property Customizers
[Property]- Marks something as a property visible to inspector[Header("")]- Adds a header above the property in the inspector.[Space]- Adds vertical space above the property.[Title("")]- Manually set the pretty name[Description("")]- Description in the tooltip[Placeholder("")]- Placeholder text in string properties[Group("")]- Similar to Category, groups properties together.[ToggleGroup("")]- Creates a group that can be toggled on/off using a named property.[Category("")]- Groups properties into categories in the inspector.[Feature("")]- Sets the category or group (similar to Category).[FeatureEnabled]- Marks a boolean property as a feature toggle.[Order(1)]- Controls the visual order of members in UI.[WideMode]- Expands the value editor to fill the next line, placing the title above it.[ReadOnly]- Displays in the inspector but prevents editing.[TextArea]- Shows a multi-line text box for string properties.[Range(0, 100)]- Creates a slider for ranged float values.[Step(5)]- Restricts values to multiples of the step value.
Property Helpers
[RequireComponent]- Ensures a component exists on the GameObject (creates it if missing).[HideIf("PropertyName", value)]- Hides property if another property has a given value.[ShowIf("PropertyName", value)]- Shows property if another property has a given value.[Change]or[Change("MethodName")]- Invokes a method when the property changes. CallsOn[PropertyName]Changedif no name provided. The callback should have 2 arguments -oldValueandnewValue.Validate( "SimpleMethod", "ValidateMessage", LogLevel.Warn )- Similar to change but method returns bool, if bool is false displays an infobox[InputAction]- Uses an input action selector for string properties.[FontName]- Uses a font name selector for string properties.[IconName]- Uses a Material Icon selector for string properties.[InfoBox("")]- Draws an information box above the property.[Normal]- For Vector properties provides normal selection tools .
Methods
[Button("BtnText")] - Shows a button in the inspector that calls the method.Not Personally Tested - Educated Guesses
[ClientEditable] - Indicates a property can be edited by the client (e.g., in Sandbox Mode). [Event("event.name")] - Generic event listener.[Input] - Makes a method available as a Map Logic Input in Hammer Editor (entities only).Hotload Attributes
[SkipHotload] - Skips processing during hotload for specific fields or types. [SuppressNullKeyWarning] - Suppresses warnings for null keys during hotload in dictionaries/hashsets. [SupportsILHotload] - Marks a type as supporting IL hotload. [MethodBodyChange] - Indicates method body changes support. [PropertyAccessorBodyChange] - Indicates property accessor body changes support.Console Commands & Variable
[ConCmd("command_name")] - Registers a console command. [ConVar("var_name")] - Registers a console variable.File Path Attributes
[AssetPath] - String selector for assets of a specific extension. [ImageAssetPath] - String selector for image assets. [FilePath("txt")] - File picker for the given extension (or all by default). [TextureImagePath] - Allows selection of anything that can be a Texture. [MapAssetPath] - String selector for map assets.Networking Attributes
[Rpc] - Marks a method as an RPC callable over the network. [Rpc.Broadcast] - RPC called for everyone. [Rpc.Host] - RPC only called on the host. [Rpc.Owner] - RPC only called on the owner of the object. [Sync] - Auto-synchronizes a property from owner to other clients.