Class RideUtils
Helpful functions used across different systems
Inheritance
Inherited Members
Namespace: Ride
Assembly: cs.temp.dll.dll
Syntax
public static class RideUtils
Fields
Name | Description |
---|---|
Deg2Rad | |
Infinity | |
JsonNoRefHandlingSettings | |
NegativeInfinity | |
PI | |
Rad2Deg | |
RideProductionApi | |
TwoPI |
Methods
Name | Description |
---|---|
Abs(Int32) | |
Abs(Single) | |
Acos(Single) | Calculates the arcosine of the angle. |
ApplicationDataPath() | |
ApplicationPersistentDataPath() | |
Approximately(Single, Single) | |
Atan2(Single, Single) | Returns the angle between the x-axis and a 2D vector starting at zero and terminating at (x,y) |
CalculateSurroundingPositions(ISpatialObject, Single, Int32) | Determines the world positions around an object. |
CalculateSurroundingPositions(RideVector3, RideQuaternion, RideVector3, Single, Int32) | Determines the world positions around an object. |
CalculateSurroundingPositions(Transform, Bounds, Single, Int32) | Determines the world positions around an object. |
CheckCapability(UnityEngine.MonoBehaviour, String, Action<String>) | |
Clamp(Int32, Int32, Int32) | Clamps the given value between the min and the max range. If the value is between min and max, value is returned |
Clamp(Single, Single, Single) | Clamps the given value between the min and the max range. If the value is between min and max, value is returned |
Clamp01(Single) | Clamps the given value between the 0 and 1. If the value is between 0 and 1, value is returned |
ClearAssetBundleCache() | |
ClosestAgentFromPosition(RideVector3, List<RideID>) | Find the agent id of the closest agent to a position. |
ConvertRange(Single, Single, Single, Single, Single) | Converts the value from the old range to the new range while maintaining the same ratio of the value |
Copy(String, String, Boolean) | |
Cos(Single) | Calculates the cosine of the angle |
DeleteAsync(String, Dictionary<String, String>) | Sends an http(s) DELETE request asynchronously |
DeltaAngle(Single, Single) | |
EaseInCirc(Single) | |
EaseInOutCubic(Single) | Smoothing function following an ease in out cubic function. |
EaseInOutSine(Single) | Smoothing function following an ease in out sine function. |
EaseOutCubic(Single) | Smoothing function following an ease out cubic function. |
ExistsInS3(UnityEngine.MonoBehaviour, String, Action<Boolean>) | Checks if a file exists in S3. |
FileExists(String) | |
Floor(Single) | |
FloorToInt(Single) | |
Get(String) | Sends an http(s) get request |
Get(String, Dictionary<String, String>) | Sends an http(s) get request |
GetAgentsInSight(IApi, RideID, Team) | |
GetAsync(String) | Sends an http(s) GET request asynchronously without headers |
GetAsync(String, Dictionary<String, String>) | Sends an http(s) GET request asynchronously |
GetAsyncHost(String, Dictionary<String, String>, String) | Sends an http(s) GET request asynchronously with a host |
GetBoolPreference(String) | Gets a preference setting from the local machine |
GetClosestAgent(RideID) | Find the closest agent to agent. Use all agents in the scenario. |
GetClosestAgent(RideID, IEnumerable<RideID>) | Find the agent id of the closest agent to agent. |
GetClosestAlly(RideID) | Find the closest ally to agent. |
GetClosestEnemy(RideID) | Find the Closest enemy to agent. |
GetCount<T>(IEnumerable<T>) | |
GetDeltaTime() | The amount of time elapsed in seconds since last frame. |
GetDeviceNameAndTimestamp() | Return the name of the current device running RIDE and the current timestamp in "MM/dd h:mm:ss |
GetDeviceNameFiltered() | |
GetEnvironmentVariable(String) | |
GetFirstHit(RideVector3, ISpatialObject) | |
GetFrameCount() | Get the number of frames since the start of the scene. |
GetFrustum(Camera) | Returns the view frustum of the camera Ordering: [0] = Left, [1] = Right, [2] = Down, [3] = Up, [4] = Near, [5] = Far |
GetFrustum(Single, Single, Single, Single, RideVector3, RideQuaternion) | |
GetFrustum(Single, Single, Single, Single, Transform) | Creates a view matrix and returns its frustum planes. |
GetGraphicsDeviceName() | |
GetGraphicsMemorySize() | |
GetJsonConfig() | |
GetJsonConfigNoObjRef() | |
GetKey(KeyCode) | Returns true whenever the user is pressing the key down |
GetKeyDown(KeyCode) | Returns true during the frame when the user starts pressing the key |
GetKeyUp(KeyCode) | Returns true whenever during the first frame that the user release the key |
GetNumProcessors() | |
GetObjectsInView(Camera) | Returns an array of all game objects in the scene that have colliders which are in the camera's view. |
GetObjectsInView(Camera, IEnumerable<GameObject>) | Tests the given list of game objects and returns those that are in view. |
GetObjectsInView(Plane[]) | Returns an array of all game objects in the scene that have colliders in the given frustum. |
GetObjectsInView(ISpatialObject, IEnumerable<ISpatialObject>) | |
GetObjectsInView(RideVector3, RideVector3, Plane[], IEnumerable<GameObject>) | |
GetObjectsInView(Single, Single, Single, Single, RideVector3, RideQuaternion, IEnumerable<ISpatialObject>) | |
GetOS() | |
GetPreference(String) | Gets a preference from the local machine |
GetRandomElement<T>(IEnumerable<T>) | Returns a random element in the container. |
GetRaycastHit(RideVector3, RideVector3, RideLayerMask, Single) | Casts a ray and returns the RaycastHit info. |
GetRaycastHit(RideVector3, RideVector3, Single, RideLayerMask, Single) | Casts a ray and returns the RaycastHit info. |
GetRaycastHitFromCamera(Int32) | Casts a ray from the main camera when the raycastButton is pressed. |
GetRaycastHits(RideVector3, RideVector3, RideLayerMask, Single) | |
GetResolutionHeight() | Get the current height of the screen in pixels |
GetResolutionWidth() | Get the current width of the screen in pixels |
GetRideRestApi(String) | |
GetSceneName() | Returns the name of the current scene |
GetSecondsSinceSceneLoad() | Get the number of seconds since the scene was loaded |
GetStreamFromString(String) | Get a Stream (MemoryStream) from the given string, pointing to the start of the string. Make sure to call Dispose() on the returned Stream. |
GetStringFromStream(Stream) | Retrieves a string from the given stream. |
GetSystemMemorySize() | |
GetUserName() | Returns the name of the user who is logged in. If not availabe, it uses GetDeviceNameFiltered |
GetVisibleObjects(Single, Single, Single, Single, Transform) | Returns a set of VisibleObjects from the viewers perspective. |
Heuns(Single, RideVector3, RideVector3, Single, out RideVector3, out RideVector3) | Get the military symbology as a png in an array of bytes that is specified by the SDIC the SDIC is broken up into the first half and second half and the passed to the mil-symbology server the server returns the image |
IsApplicationPlaying() | Returns true if the application is playing |
IsDebugBuild() | Returns true if you are using a debug/development build |
IsHit(ICamera, RideVector3, ISpatialObject, Single) | Tests if you hit testObject with the ray cast. |
IsHit(ICamera, RideVector3, RideLayerMask, Single) | Tests if you hit something with the ray cast. |
IsHit(RideVector3, RideVector3, RideLayerMask, Single) | Tests if you hit something with the ray cast. |
IsInternetConnectionAvailable() | Tests if the local machine has a connection to the internet |
IsMeshClean(Mesh) | |
IsMeshCoplanar(Mesh) | Checks if all mesh triangles lie on the same plane. |
IsMeshValid(Mesh) | Checks if mesh has at least four distinct vertices. |
IsMouseOverUI() | Tests if the mouse is over UI elements |
IsObjectInView(Plane[], Collider) | Returns true if the test object is inside the frustum. |
IsObjectInView(Plane[], GameObject) | Returns true if the testObject is inside the frustum. The testObject requires a collider component. |
IsObjectInView(Plane[], Bounds) | Returns true if the bounds intersects inside the frustum. |
IsObjectOccluded(RideVector3, ISpatialObject, out ISpatialObject, RideVector3, Single) | |
IsObjectOccluded(RideVector3, ISpatialObject, out ISpatialObject, Single) | |
IsObjectOccluded(RideVector3, ISpatialObject, RideVector3, Single) | |
IsObjectOccluded(RideVector3, ISpatialObject, Single) | Tests if the testObject is occluded from the viewer. |
IsProcessRunning(String) | |
JsonClose() | |
JsonDeserialize<T>(String) | |
JsonDeserializeIgnoreNullAndMissing<T>(String) | |
JsonOpen() | |
JsonOpenParameter(String) | |
JsonSerialize<T>(T) | |
JsonSerialize<T>(T, JsonSerializerSettings) | |
JsonSerializeNoObjRef<T>(T) | |
JsonSerializeToFile<T>(T, String) | |
JsonSerializeToFile<T>(T, String, JsonSerializerSettings) | |
Lerp(Single, Single, Single) | |
LoadScene(String) | |
LoadSceneAsync(String) | |
Max(Int32, Int32) | Returns the larger of the 2 values |
Max(Int32[]) | Returns the largest value in the set |
Max(Single, Single) | Returns the larger of the 2 values |
Max(Single[]) | Returns the largest value in the set |
Mean(Single[]) | Calculates the mean average of the set |
Min(Int32, Int32) | Returns the smaller of the 2 values |
Min(Single, Single) | Returns the smaller of the 2 values |
Min(Single[]) | Returns the smallest value in the set |
Mod(Int32, Int32) | C#'s % operator uses a truncated definition. This is an alternative floored definition |
OpenURL(String) | Open a website using the given url in your default browser |
OverlapSphere(RideVector3, Single, RideLayerMask, QueryTriggerInteraction) | Computes and stores colliders touching or inside the sphere. |
ParseEnum<TEnum>(Object) | Parse the value into an enumeration |
Patch(String, String, Dictionary<String, String>, String) | Sends an http(s) PATCH request |
PatchAsync(String, String, Dictionary<String, String>, String) | |
PathCombine(String[]) | Combines all the paths together using the operating system appropriate slash |
PointInPolygon(Single, Single, RideVector2[]) | Determines whether a given x and y point falls within the bounds of a polygon. |
Post(String, String, Dictionary<String, String>) | Sends an http(s) POST request asynchronously |
Post(String, String, Dictionary<String, String>, String) | Sends an http(s) POST request asynchronously |
Post(String, String, Dictionary<String, String>, String, String) | Sends an http(s) POST request asynchronously |
Post(String, String, String) | |
Post(String, String, String, String) | Sends a http(s) JSON POST request asynchronously |
Post(String, String, String, String, Double) | Sends a http(s) JSON POST request asynchronously |
Post<T>(String, String, T) | Sends a http(s) post request |
PostAsyncWithForm(String, Dictionary<String, String>) | Sends an http(s) POST request with Form Data asynchronously |
Pow(Single, Single) | Returns f raised to power of p. |
Put(String, String, Dictionary<String, String>) | Sends an http(s) Put request |
Put(String, String, Dictionary<String, String>, String) | Sends an http(s) Put request |
PutAsync(String, String, Dictionary<String, String>, String, String) | |
QuitApplication() | Exit the application |
RandomRange(Int32, Int32) | Get a random integer value between min [inclusive] and max [exclusive] |
RandomRange(Single, Single) | Get a random decimal number between min and max inclusive |
RandomVector(RideVector3, RideVector3) | Generates a vector with x, y, and z components between min and max |
Raycast(RideRay, out RideRaycastHit) | Physics Raycast |
Raycast(RideRay, out RideRaycastHit, Single) | Physics Raycast |
Raycast(RideRay, out RideRaycastHit, Single, Int32) | Physics Raycast |
ReadAllBytes(String) | |
ReadAllText(String) | Reads and returns the data in the local file |
ReadLines(String) | |
Request(String, Action<String>) | |
Request(String, Action<String>, Int32, Int32, Boolean) | Send a GET request using the given URI. |
Round(Single) | Rounds the float to the nearest integer. |
RoundToInt(Single) | Returns the nearest rounded integer |
SetPreference(String, Boolean) | Sets a preference on the local machine |
SetPreference(String, Int32) | Sets a preference on the local machine |
SetPreference(String, String) | Sets a preference on the local machine |
Sin(Single) | Calculates the sin of the angle |
Spread(RideVector3, Single) | Modifies the direction vector on all axis by an ammount between -spreadFactor and +spreadFactor. |
Sqrt(Single) | Returns the square root of f |
StandardDeviation(Single[]) | Calculates the standard deviation of the sample set |
StreamingAssetsPath() | |
Sum(Single[]) | Returns the sum of all the values in the set |
Swap<T>(ref T, ref T) | a becomes b and b becomes a |
TryParseEnum<TEnum>(Object, out TEnum) | |
WeightedMean(Single[], Single[]) | Calculates the weighted mean average of the set |