Global Functions and Fields

Global Functions
CreateEmptyTransformProxy : rettturns TransformProxy

Returns a TransformProxy.

PrintAllTypes

Prints all available types.

PrintAllComponentsOnTransformProxy(TransformProxy A)

Takes a TransformProxy and prints all the components on it.

PrintTypeInfo(string A)

Takes a type as a string and prints fields, properties and methods of that type

FindGameObjectsOfTypeInScene(string A) : returns table

Takes a type as a string and returns a table of TransformProxys with the type in the scene

FindGameObjectsWithTagInScene(string A) : returns table

Takes a tag as a string and returns a table of TransformProxys with the tag in the scene

DelayedCall(int A, string B, string C, Table D) : returns DelayedScript

Takes a frame delay (A), scriptPath (B), function name (C), Table of input parameters (D). Returns a DelayedScript class instance and executes the function pointed to after a delay of A frames.

DisplayTransformTree(TransformProxy A)

Takes a TransformProxy and prints its transform tree, where it's treated as the root of the tree. '-' character represents depth in the tree.

SetModTitleDisplay(string A)

Sets the title to A in mod's menu.

LuaDebugLogString(string A)

Prints the string (A).

LuaDebugLogObject(object A)

Prints the type of object (A).

GetMainCanvas : returns TransformProxy

Returns the TransformProxy of the main canvas in the scene.

GetEulerAngles(Table A) : returns Table

Returns the TransformProxy of the main canvas in the scene.

LoadAsset(string A, string B) : returns TransformProxy

Takes the Asset Bundle (A) and object name to load (B), returns the TransformProxy of the loaded asset.

CreateCopy(object A) : returns TransformProxy

Takes an object (A), creates a copy and returns the TransformProxy of its copy.

AddToMyModScrollPanel(TransformProxy A, float B, float C, float D)

Takes a TransformProxy A and places it on the main mod scroll panel at point (B,C,D).

MainCameraTransformProxy : returns TransformProxy

Returns the TransformProxy of the main camera in the scene.

GetTransformProxyOfMainCamera : returns TransformProxy

Returns the TransformProxy of the main camera in the scene.

LayerMaskFromString(string A) : returns int

Takes a layer mask string (A) and returns its layermask integer.

LayerMaskToString(int A) : returns string

Takes a layer mask int (A) and returns its layermask's name.

DestroyTransformProxy(TransformProxy A)

Takes a TransformProxy and destroys it.

DestroyComponent(Component A)

Takes a Component and destroys it.

InputGetInputAcceleration : returns Table

Returns the current device acceleration in 3 dimensions.

InputGetAccelerationEventCount : returns int

Returns the number of acceleration events that occurred last frame.

InputGetAnyKey : returns bool

Returns if any key or mouse button is currently held down.

InputGetAnyKeyDown : returns bool

Returns true the first frame any key or mouse button is held down.

InputGetAxis(string A) : returns float

Returns the value of the virtual axis defined by name (A).

InputGetAxisRaw(string A) : returns float

Returns the value of the virtual axis defined by name (A) with no smoothing applied.

InputGetButton(string A) : returns bool

Returns true while the virtual button identified by name (A) is held down.

InputGetButtonUp(string A) : returns bool

Returns true the first frame the virtual button identified by name (A) is released.

InputGetButtonDown(string A) : returns bool

Returns true the first frame the virtual button identified by name (A) is pressed down.

InputGetMouseButton(int A) : returns bool

Returns true while the virtual mouse button identified by int (A) is held down.

InputGetMouseButtonUp(int A) : returns bool

Returns true the first frame the virtual mouse button identified by int (A) is released.

InputGetMouseButtonDown(int A) : returns bool

Returns true the first frame the virtual mouse button identified by int (A) is pressed down.

InputMousePosition : returns Table

Returns the current mouse position in a table {x, y, z}.

InputMousePosition : returns Table

Returns the current mouse scroll delta in a table {x, y}.

InputResetInputAxes

Resets all input.

PhysicsBoxLineCast(PhysicsRaycastParams A) : returns TransformProxy

Takes a PhysicsRaycastParams class as input, returns a TransformProxy if one was hit (null if nothing was hit).

PhysicsBoxLineCast(Table A, Table B, int C) : returns bool

Takes a start point (A), and end point (B) and a layer (C) as input. Returns whether an object was found in the cast.

PhysicsBoxCast(PhysicsBoxCastParams A) : returns bool

Takes a PhysicsBoxCastParams class as input, returns whether an object was found in the cast.

PhysicsBoxCastAll(PhysicsBoxCastParams A) : returns bool

Takes a PhysicsBoxCastParams class as input, returns whether an object was found in the cast.

PhysicsCapsuleCast(PhysicsCapsuleCastParam A) : returns bool

Takes a PhysicsCapsuleCastParam class as input, returns whether an object was found in the cast.

PhysicsOverlapCapsule(PhysicsOverlapCapsuleParams A) : returns Table

Takes a PhysicsOverlapCapsuleParams class as input, returns a table containing a TransformProxy for each overlapped object.

PhysicsOverlapSphere(PhysicsOverlapSphereParams A) : returns Table

Takes a PhysicsOverlapSphereParams class as input, returns a table containing a TransformProxy for each overlapped object.

PhysicsOverlapBox(PhysicsBoxCastParams A) : returns Table

Takes a PhysicsBoxCastParams class as input, returns a table containing a TransformProxy for each overlapped object.

PhysicsClosestPoint(PhysicsClosestPointParams A) : returns Table

Takes a PhysicsClosestPointParams class as input, returns a table containing containing the closest point on the passed collider (in the PhysicsClosestPointParams) to the specified location(in the PhysicsClosestPointParams).

PhysicsGetIgnoreLayerCollision(int A, int B) : returns bool

Returns whether or not collisions are allowed between layers (A) and (B).

PhysicsIgnoreCollision(ColliderProxy A, ColliderProxy B, bool C)

Sets whether colliders (A) and (B) should collide based on (C).

PhysicsComputePenetration(PhysicsComputPenetrationParams A) : returns PhysicsComputPenetrationResults

Finds penetration values between two colliders in (A), returns the results in a PhysicsComputPenetrationResults class instance.

PhysicsIgnoreLayerCollision(int A, int B, bool C) : returns PhysicsComputPenetrationResults

Sets whether layers (A) and (B) should ignore based on (C).

GetPhysicsBoxCastParamClass : returns PhysicsBoxCastParams

Returns a PhysicsBoxCastParams class instance.

GetPhysicsSphereCastParams : returns PhysicsSphereCastParams

Returns a PhysicsSphereCastParams class instance.

GetPhysicsOverlapSphereParamClass : returns PhysicsOverlapSphereParams

Returns a PhysicsOverlapSphereParams class instance.

GetPhysicsOverlapCapsuleParamClass : returns PhysicsOverlapCapsuleParams

Returns a PhysicsOverlapCapsuleParams class instance.

GetPhysicsSphereCastParams : returns PhysicsSphereCastParams

Returns a PhysicsSphereCastParams class instance.

GetGetPhysicsCapsuleCastParamClass : returns PhysicsCapsuleCastParam

Returns a PhysicsCapsuleCastParam class instance.

GetPhysicsClosestPointParamsClass : returns PhysicsClosestPointParams

Returns a PhysicsClosestPointParams class instance.

GetPhysicsComputPenetrationParams : returns PhysicsComputPenetrationParams

Returns a PhysicsComputPenetrationParams class instance.

GetOriginDirectionFromCameraToMouse(TransformProxy A) : returns Table

Takes the TransformProxy (A) assumed to be a camera and returns information about the ray from the camera to the layer's mouse in a table {ray origin x, ray origin y, ray origin z, ray direction x, ray direction y, ray direction z}.

GetPhysicsRaycastParamClass : returns PhysicsRaycastParams

Returns a PhysicsRaycastParams class instance.

Global variables
MyModDirectory : gets the path to this mod's directory.

MyModID : gets the Steam id of this mod.

MyModMenuButton : gets the assigned menu button of this mod.

_buttonGeneralPrefab : gets a reference to a button used as a default to create your own buttons.

_timeDeltaTime : gets the time in seconds the previous frame took to complete.

_timecaptureFramerate : sets/gets the capture frame rate.

_timefixedDeltaTime : sets / gets the interval in seconds at which physics and other fixed frame rate updates are performed.

_timefixedUnscaledDeltaTime : gets the timeScale-independent interval in seconds from the last fixed frame to the current one.

_timefixedUnscaledTime : gets the time in seconds since the start of the game.

_timeframeCount : gets the total number of frames that have passed.

_timeinFixedTimeStep : gets whether or not this is called inside a fixed time step.

_timemaximumDeltaTime : gets / sets the maximum time a frame can take.

_timemaximumParticleDeltaTime : gets / sets the maximum time a frame can spend on particle updates. If the frame takes longer than this then updates are split into multiple smaller updates.

_timerealtimeSinceStartup : gets the time in real seconds since startup.

_timerenderedFrameCount : gets the number of rendered frames.

_timesmoothDeltaTime : gets a smoothed out _timeDeltaTime

_timetime : gets the time at the beginning of this frame.

_timeScale : gets / sets the time scale.

_timeSinceLevelLoad : gets the time since the level was loaded.

_timeunscaledTime : gets the timeScale-independent time for this frame.