For the complete documentation index, see llms.txt. This page is also available as Markdown.

KS.Reactor

Namespaces

KS.Reactor.Client

KS.Reactor.Server

Classes

ksAtomicList<T>.Iterator

Holds index and value data used when iterating an atomic list.

ksJSON.Literals

JSON literals

ksStreamBuffer.Segment

Represents a segment of a ksStreamBuffer. While a segment is not released, the buffer cannot be written to or released.

ksPlayerAPI.Session

Player session information with implementation of the API requests that require an authenticated player.

ksServerAPI.Session

Player session information use for validation and player tracking.

ksAsyncResult<T>

Handles the tracking and response handling for asynchronous cluster requests that return results.

ksAsyncResult

Handles the tracking and response handling for asynchronous cluster requests.

ksAtomic<T>

Provides atomic access to a generic type.

ksAtomicDictionary<Key, Value>

Wraps a Dictionary to make all read/write operations thread safe.

ksAtomicHashSet<T>

Wraps a HashSet to make all read/write operations thread safe.

ksAtomicList<T>

Wraps a list to make all read/write operations thread safe.

ksAtomicQueue<T>

Wraps a Queue to make all read/write operations thread safe.

ksBaseAssetLoader

Abstract base class for asset loaders that load and cache ksScriptAssets.

ksBasePhysics

Base physics class available on client and server.

ksBaseQueryParams

Base class containing parameters used in all physics queries.

ksBitIStream

Bit stream reader

ksBitOStream

Bit stream writer

ksBitReader

Reads bit-packed data from a ksStreamBuffer that was written using a ksBitWriter.

ksBitWriter

Writes bit-packed data to a ksStreamBuffer. When you are done writing all your data, you must call Flush to ensure the last byte of data is written. Read the data using a ksBitReader.

ksBox

Box.

ksCapsule

Capsule.

ksCharacterControllerColliderHit

This class is used by OnColliderHit to give information about the collision.

ksCharacterControllerEvents

Contains event handler delegates for the character controller.

ksCloneableAttribute

Tags non-editable fields and properties in server scripts to make them copy when the script is cloned.

ksClusterProperty

A hierarchy of dictionary objects that store hierarchy-type and value-type cluster properties. Properties can be accessed from any level of the property hierarchy by providing a path (a list of keys joined by the path separator '.')

ksClusterRPCAttribute

Attribute used to mark cluster RPC handlers on room and entity scripts.

ksCollisionFilter

The collsion filter uses 3 mask properties (Group, Notify, Collide) to determine interaction and notifications during the physics simulation. This class is immutable.

ksCompressionConstants

Defines compression related constants.

ksConstList<T>

Wraps an IList and provides read-only access to it.

ksConstMap<Key, Value>

Wraps a dictionary and provides read-only access to it.

ksCoroutine

Wrapper for an IEnumerator function. Each update frame, KSCoroutines started on a script will advance to the next return yield statement.

ksCoroutineManager

Store and manage advancement of coroutines.

Predefined Coroutines Sleep Wait

ksCurve

Describes a curve defined by keyframes. Each key frame contains information to create two points of a cubic Bezier curve. For a given segement between keyframe k0 and k1 the bezier points are defined to be 0, k0.Value), (k0.OutWeight, k0.OutTangent * t * k0.OutWeight + k0.Value), (1 - k1.InWeight, -k1.InTangent * t * k1.InWeight + k0.Value), (1, k1.Value) where t is k1.time - k0.time

ksEditableAttribute

Tags fields and properties in server scripts with this to expose them to the editor.

ksEvent<E, T>

Wraps a C# event for the delegate T to allow event references.

ksEvent<T>

Wraps a C# event for the delegate T to allow event references.

ksEventMap<K, E>

A dictionary of events. Example Usage:

// Add an event handl map[key] += handler;

// Remove an event ha map[key] -= handler;

ksEventMap<T>

A dictionary of events. Example Usage:

// Add an event handl map[key] += handler;

// Remove an event ha map[key] -= handler;

ksEventSet<T>

Tracks events in a hashset.

ksExceptionHandler

Exception handlers.

ksFixedDataParser

A class that parses byte array to uint or struct.

ksFixedDataWriter

A class that writes uint or struct to a byte array.

ksGroupMaskFilter

A query filter that looks for colliders that belong to one of the collision groups in the GroupMask. All hits TOUCH.

ksHashSet<T>

A hash set with an event that fires when the hash set is modified.

ksHierarchyObject<T>

Templated base class for hierarchy objects that have a parent and list of children of type T. There is also a non-templated variant of ksHierarchyObject.

ksHierarchyObject

Non-templated base class for hierarchy objects with a parent and children. There is also a templated variant that enforces all objects in the hierarchy derive the templated type.

ksInput

Class for querying player inputs.

ksInputBuffer

This input buffer reads data written to a byte array by a ksOutputBuffer.

ksInputRegistrar

Buttons, axes, values, and controllers are registered with an ksInputRegistrar while they are in use so we know which inputs to send over the network.

ksJSON

Represents a JSON value and provides methods for serializing/deserializing JSON. Unlike standard JSON, this implementation differentiates between floats and ints and supports NaN, infinity, and negative infinity. Ints are stored as 64 bit longs.

ksLinkedList<T>

A linked list that can be modified while being iterated.

ksLog

Static logger class. Log messages have a level and a channel string that can be used to filter log messages. Channels can have parent channels. Any message a channel receives will also be sent to all of it's parent channels. Channels are seperated by ".", with children channel following parents. All channels are children of the root channel. If a non-string object is passed as channel parameter T to a log function, the channel string will be [namespace.classname]. Example: ksLog.Info("X.Y", "This message will be received by channels 'X.Y', 'X', and 'Root');

ksMath

Collection of frequently used math algorithms and coversions of Math methods which operate on and return float values.

ksMultiList<T>

Wraps multiple lists and presents them as one list with read-only access.

ksNoUnityProxyAttribute

Server scripts tagged with this will not have Unity proxy scripts generated for them.

ksObjectPool

Static class for configuring object pools.

ksObjectPool<T>

An object pool that constructs new objects using the default constructor or a factory delegate.

ksOrderedEventMap<E>

Tracks events in a sorted dictionary.

ksOutputBuffer

This output buffer converts each written element into one or two byte arrays and adds them to a list. When the output is requested, by calls to GetBytes() or Flush(), the list of byte arrays is copied to a single byte array. This approach is significatly faster for large amounts of data when compared to using memory streams or resizing an array for each write operation.

ksOverlapParams

Parameters for overlap queries

ksPerformanceTimer

Basic performance timer that tracks time and reports timing statistics.

ksPerlinNoise

Adaption of the the perlin noise code found at http://adrianb.io/2014/08/09/perlinnoise.html

ksPlayerAPI

Implementation of the ksPlayerAPI used for player requests.

ksPlayerController

Base class for player controllers. Player controllers allow you to write one class that runs on both the client and the server for controlling entity movement using player inputs. The server uses it for authoritative movement, and the client uses it for prediction/latency masking.

ksPlayerControllerCache

Cache mapping player controller types to controller prefabs.

ksPropertyMap

Provides access to ksProperties.

ksRPCAttribute

Attribute used to mark RPC handlers on room and entity scripts.

ksRPCManager<Attribute>

Manages the registration, storing and invocation of methods tagged with ksRPCAttributes.

ksRandom

Extends the built-in C# Random class with methods for generating floats, vectors, and quaternions.

ksRange

Defines a numerical range that wraps around.

ksRaycastParams

Parameters for raycast queries.

ksReadOnlyTransform2DExtension

Extension methods for ksIReadOnlyTransform2D

ksReadOnlyTransformExtension

Extension methods for ksIReadOnlyTransform

ksReadOnlyTransformState

Read-only transform data.

ksReflectionUtils

Reflection utility functions.

ksRenamedFromAttribute

When you rename ksEditable fields or properties in server scripts, add this tag with the old name to preserve saved values.

ksRoomInfo

Holds room data that is available without connecting to the room, including data required to connect to the room.

ksScript<Parent, Script>

Base class for Reactor scripts.

ksScriptAsset

Base class for scripts that can be loaded from assets.

ksScriptList<Parent, Script>

A templated list of scripts.

ksServerAPI

Implementation for the KSPlayerAPI calls made with server credentials.

ksShape

A base class of the shapes used in the scene queries.

ksSharedDataAttribute

Server scripts tagged with this will not have their editable field data stripped from their proxy scripts in client builds. This tag applies to all derived scripts.

ksSimulationFilter

A query filter that uses the query collider's collision filter rules. Use this with entity queries to use the entity's colliders' collision filters as the filter. Colliders that collide with the query collider will BLOCK, and colliders that do not collide but do belong to one of the query collider's notify groups will TOUCH. Excludes non-trigger non-simulation colliders from results. Cannot be used for shape queries or raycasts.

This also implements ksIEntityQueryColliderFilter. Set this as the EntityColliderFilter for entity queries to exclude the entity's non-trigger non-simulation colliders from being queried.

ksSpawnParams

Parameters for spawning entities.

ksSpawnParams2D

Parameters for spawning entities with 2D transform values.

ksSphere

Sphere.

ksStreamBuffer

Manages a buffer for reading and writing stream data to a byte array.

ksSweepParams

ksSweepSlideParams

Paramters for sweep-and-slide movement. When a sweep hits something, the remaining movement vector is projected onto the plane perpendicuar to the surface normal to get a new movement vector which is used to sweep recursively.

ksTime

Holds time data that is common to the client and server.

ksTransform

Transform with methods for moving entities. Their are two kinds of movement: teleportation and moving. Moving will test for collisions along the way and teleportation will not. If you make more than one move call in a frame, the collision check will be along a straight path from the position at the start of the frame to the end position. You cannot do a move and a teleport in the same frame. If you make both calls the entity will teleport.

ksTransform2D

Transform with methods for moving entities in 2 dimensions. There are two kinds of movement: teleportation and moving. Moving will test for collisions along the way and teleportation will not. If you make more than one move call in a frame, the collision check will be along a straight path from the position at the start of the frame to the end position. You cannot do a move and a teleport in the same frame. If you make both calls the entity will teleport.

ksTransformState

Transform data.

ksTransformState2D

Wraps a ksTransformState and provides a 2D view of the data.

ksUnityTagAttribute

Tag server fields, properties, classes or structs to add arbitrary Unity tags to their generated proxies. Fields and properties tagged with this attribute will be editable in the inspector even if they aren't tagged with ksEditableAttribute. Note that if Tag is not valid code, it will generate proxies that have compiler errors.

ksWebRequest

Asynchronous web request class using HTTP Web Request.

ksWebResponse

ksIWebRequest response ojbect.

Structs

ksCurve.Keyframe

Key frame data use to determine Bezier points.

ksAddress

Holds host and port

ksAuthenticationResult

Authentication result returned by user authentication functions. Authentication passes if Code is zero. If there are multiple authentication functions, if any of them return a non-zero code, authentication fails.

ksBounds

A struct that defines an axis aligned bounding box (AABB).

ksColor

Partial ksColor struct. This part is the major part that contains members that does not depend on UnityEngine.

ksEntityId

An entity id uint with type information. The type can be a server entity id or a temporary spawn id that players use to identify entities they spawned before the server confirms the spawn and sends the server entity id. Internally the id is just a uint and the type is determined by which bits are set. If the highest bit is set, it's a temporary spawn id, otherwise it's a server entity id, unless the value is zero in which case it is invalid. Temporary spawn ids are not enough to identify an entity on the server; the id of the player who spawned the entity is also needed.

ksMultiType

A union struct that can hold most primitive types, vectors, strings, and arrays. See Types for the supported types.

ksOverlapResult

Result of an overlap scene query.

ksQuaternion

ksQuaternion struct.

ksQueryHitResults<T>

Struct containing touching hits and the blocking hit results from a raycast or sweep query.

ksRaycastResult

Result of an raycast scene query.

ksSweepResult

Result of a sweep scene query.

ksVector2

Vector2 struct.

ksVector2Int

Vector struct with 2 integers.

ksVector3

ksVector3 struct.

ksVector3Int

Vector struct with 3 integers.

Interfaces

ksScript<Parent, Script>.IInternals

Internal interface. These members are hidden unless the class is cast to this interface.

ksIBufferable

Interface required by objects that should be written to, and read from, the ksOutputBuffers and ksInputBufers.

ksICharacterController

Character controller interface.

ksICollider

Collider interface used in common scripts that run on server and client

ksIEntity

Entity interface that both client and server entities implement.

ksIEntityQueryColliderFilter

Interface for query collider filters that are used with entity queries to decide which of the entity's colliders to run queries for.

ksIEvent

Interface for events used with ksEventMap%602.

ksIPerformanceTimer

Performance timer interface.

ksIQueryFilter

Interface for query filters that filter colliders from scene queries.

ksIQueryHitResult

Interface for ksSweepResult and ksRaycastResult.

ksIReadOnlyTransform

Read-only transform interface.

ksIReadOnlyTransform2D

Read-only 2D transform interface.

ksIRigidBody

Interface exposed to player controllers to restrict access to entity physics data.

ksIRigidBody2D

Interface exposed to player controllers to restrict access to 2D entity physics data.

ksISerializable

Interface for objects that can be written to or read from a ksStreamBuffer.

ksIWebRequest

Web request interface.

Enums

ksClusterProperty.ActionTypes

Types of actions to perform on cluster properties. Used by the property event handlers.

ksShape.Axis

Axis used for revolute shapes (capsule, cylinder, cones).

ksSweepSlideParams.CallbackStates

Enum passed to CollideCallback to indicate if there will be a new sweep, or the reason there will not be another sweep.

ksClusterProperty.DeleteCache

Delete cache enum.

ksPlayerAPI.DeviceTypes

Recognized device types.

ksReadOnlyTransformState.DirtyFlag

Dirty flags

ksCurve.EvalModes

Affects how the keyframes are used when evaluating a curve.

ksMath.Interpolation

ksMultiType.LegacyTypes

Legacy types from Reactor 1.0.3 and earlier.

ksLog.Level

Log levels.

ksClusterProperty.ReadCache

Read cache enum.

ksRoomInfo.RoomState

Room load state.

ksSpawnParams.ScaleModes

Scale modes

ksShape.ShapeTypes

Support shapes for scene queries.

ksPerformanceTimer.States

Timer states

ksEntityId.Types

Id types

ksMultiType.Types

Types that can be stored in the ksMultiType.

ksJSON.Types

JSON value types.

ksCurve.WrapModes

Affects how the curve is evaluated when the time falls outside the curve duration.

ksClusterProperty.WriteCache

Write cache enum.

ksCharacterControllerCollisionFlags

Collision flags is a bitmask returned by character controller's Move method.

ksConnectionProtocols

Supported network protocols

ksConnectionStates

Connection states

ksForceMode

Determines how forces are applied.

ksOwnerPermissions

Flags that determine what permissions the player who owns an entity has.

ksQueryFlags

Additional flags used to filter physic scene queries.

ksQueryHitTypes

Types of hits.

ksQueryObjectTypes

Types of query objects

ksQueryResultTypes

Type of results the query will return.

ksQueryTypes

Types of queries

ksRigidBody2DConstraints

Use these flags to constrain motion of rigidbodies.

ksRigidBodyConstraints

Use these flags to constrain motion of rigidbodies. Constraints

ksRigidBodyModes

Rigid body modes.

Delegates

ksSweepSlideParams.CollideHandler

Callback for when the sweep hits something.

ksCharacterControllerEvents.ColliderHitHandler

Character controller collider hit event handler.

ksCoroutineManager.CoroutineCallback

Callback invoked when the coroutine manager processes ksCoroutine.

ksBasePhysics.DepenetrateCallback

Depenetration callback for Depenetrate

ksExceptionHandler.ExceptionHandler

Exception handler.

ksAtomicDictionary<Key, Value>.Factory

Factory delegate for creating a Value.

ksObjectPool<T>.Factory

Creates a new instance for the pool.

ksOrderedEventMap<E>.ForEachCallback

ksHierarchyObject<T>.ForEachCallback

Callback for depth-first searches.

ksEvent<E, T>.ForEachCallback

Iterator callback used with ForEach

ksAtomicList<T>.ForEachCallback

Iteration callback.

ksAtomicHashSet<T>.ForEachCallback

Callback used when iterating all elements using ForEach

ksAtomicDictionary<Key, Value>.ForEachCallback

For each callback.

ksEventSet<T>.ForEachCallback

ksEvent<E, T>.ForEachCancellableCallback

Iterator callback that can cancel iteration by returning false.

ksPlayerAPI.GenericCallback

Generic callback with no return data.

ksServerAPI.GenericCallback

Generic callback with no return data.

ksWebResponse.Handler

ksIWebRequest response handler

ksLog.LogHandler

Delegate for logging a message.

ksPlayerAPI.LoginCallback

Callback for all login requests.

ksJSON.ModifyHandler

Handler for on modify events.

ksHashSet<T>.ModifyHandler

Set that was modified.

ksWebRequest.OnCompleteCallback

Callback for completed web requests.

ksPlayerAPI.RequestHandler

Web request handler for API calls.

ksServerAPI.RequestHandler

Web request handler for API calls.

ksCoroutineManager.WaitCallback

Callback used with Wait.

ksAsyncResultHandler

Delegate for cluster requests that return no results.

ksAsyncResultHandler<T>

Delegate for cluster requests that return object results.

ksIWebRequestFactory

Factory for creating a ksIWebRequest.

Last updated