Info
- Runtime helpers in
Polis.Core.Utils
- REST helpers in
Polis.Core.Http
- Small glue for packages in
ExternalUtils/
Utils
RandomUtility - random helpers
RandomItem, TryPopRandomItem
Shuffle
RandomWeightedItem, WeightedRandomBag<T>
NextGaussian
JsonUtils - JSON helpers
JsonCopy - deep clone
TryDeserializeObject, PrettifyJsonString
JsonInitializer - sets Newtonsoft defaults
[JsonTypeName] / [FormerJsonTypeName] - stable type names in JSON
- Compact converters in
Utils/Json/Converters (Vector2/3/4, Vector2Int/3Int, Quaternion, Color, Color32): a struct as a one line array, e.g. [1, 2, 3], colors leave out a default alpha. They also read the object form. Put one on a field with [JsonConverter(typeof(Vector3ArrayJsonConverter))]
ColorPalette (SO) + ColorPalettePicker - pick a color from a palette by index, implicit to Color
ActiveDefinesRegistry.IsDefined("DEFINE") - scripting defines of the build at runtime, also the version defines of packages (e.g. PURRNET). Builds read a generated Resources/ActiveDefines. DefineCondition checks one without code
IdentifierUtility - unique IDs inside a collection
LoadingOverlayProvider (service) - RequestOverlay(requester) / ReleaseOverlay(requester), stays until the last requester releases
SystemInfoPanel - short app and device info with copy and share, full details are in the debug menu. App ID is AppBuildInfo.AppIdentifier, the same on every platform
AWordGenerator / SimpleAdjectiveNameGenerator - random names
- Font symbols live in
Utils/FontSymbols, see Font Symbols
Components
TwoBoneHingeIK - arm with root, mid and tip around one hinge axis
LockParentRotation - keeps a world rotation per axis
SmoothRestrictedRotateTowards - smooth look at a target with range limits
BoxColliderRendererFitter - fits a BoxCollider to a Renderer
FPSDisplay - FPS into a TMP text