|
Iuvo Unity 0.5.1
This is library containing a variety of helper classes and extension methods for the Unity gane engine. GitHub | Iuvo Unity Updates | Creator |
Static Public Member Functions | |
| static void | Initialize (MonoBehaviour runner) |
| Initializes the CameraExtensions with a coroutine runner. | |
| static void | ShakeScreen (this Camera camera, float magnitude, float duration) |
| Shakes the camera screen by applying random offsets to its position. | |
| static void | SetBackgroundColor (this Camera camera, Color color) |
| Sets the camera's background color. | |
| static void | FadeOut (this Camera camera, float duration) |
| Fades the camera's background to transparent over a given duration. | |
| static void | FadeIn (this Camera camera, float duration) |
| Fades the camera's background from transparent to opaque over a given duration. | |
| static void | MoveToPosition (this Camera camera, Vector3 targetPosition, float speed) |
| Moves the camera towards a target position at a specified speed. | |
| static void | RotateToRotation (this Camera camera, Quaternion targetRotation, float speed) |
| Rotates the camera towards a target rotation at a specified speed. | |
| static void | LookAt (this Camera camera, Transform target) |
| Makes the camera look at a specified target. | |
| static void | LookAt (this Camera camera, Vector3 target) |
| Makes the camera look at a specified target position. | |
| static void | LookAt (this Camera camera, GameObject target) |
| Makes the camera look at a specified target GameObject. | |
| static void | Follow (this Camera camera, Transform target, Vector3 offset) |
| Makes the camera follow a specified target with an offset. | |
| static void | ZoomIn (this Camera camera, float amount) |
| Zooms in the camera by reducing its field of view. | |
| static void | ZoomOut (this Camera camera, float amount) |
| Zooms out the camera by increasing its field of view. | |
| static void | SetPosition (this Camera camera, Vector3 position) |
| Sets the camera's position to a specific value. | |
| static void | SetRotation (this Camera camera, Quaternion rotation) |
| Sets the camera's rotation to a specific value. | |
| static void | LockRotationAxis (this Camera camera, Vector3 lockedAxis) |
| Locks the camera's rotation on specific axes. | |
| static void | SetRenderTarget (this Camera camera, RenderTexture renderTexture) |
| Sets the camera's render target to a specific RenderTexture. | |
| static Ray | GetCenterRay (this Camera camera) |
| Gets a ray from the center of the camera's viewport. | |
| static ? RaycastHit | RaycastFromCenter (this Camera camera, float maxDistance, LayerMask layerMask) |
| Performs a raycast from the center of the camera's viewport. | |
Static Private Member Functions | |
| static IEnumerator | ShakeScreenCoroutine (Camera camera, float magnitude, float duration) |
| static IEnumerator | FadeOutCoroutine (Camera camera, float duration) |
| static IEnumerator | FadeInCoroutine (Camera camera, float duration) |
Static Private Attributes | |
| static MonoBehaviour | coroutineRunner |
|
static |
Fades the camera's background from transparent to opaque over a given duration.
| camera | The camera to fade. |
| duration | The time, in seconds, for the fade effect. |
References coroutineRunner, and FadeInCoroutine().
|
staticprivate |
Referenced by FadeIn().
|
static |
Fades the camera's background to transparent over a given duration.
| camera | The camera to fade. |
| duration | The time, in seconds, for the fade effect. |
References coroutineRunner, and FadeOutCoroutine().
|
staticprivate |
Referenced by FadeOut().
|
static |
Makes the camera follow a specified target with an offset.
| camera | The camera to follow the target. |
| target | The target to follow. |
| offset | The offset from the target. |
|
static |
Gets a ray from the center of the camera's viewport.
| camera | The camera from which the ray is cast. |
|
static |
Initializes the CameraExtensions with a coroutine runner.
| runner | The MonoBehaviour instance used to run coroutines. |
References coroutineRunner.
|
static |
Locks the camera's rotation on specific axes.
| camera | The camera whose rotation axes are to be locked. |
| lockedAxis | The axes to lock (x, y, z). |
|
static |
Makes the camera look at a specified target GameObject.
| camera | The camera to look at the target. |
| target | The target GameObject to look at. |
|
static |
Makes the camera look at a specified target.
| camera | The camera to look at the target. |
| target | The target to look at. |
|
static |
Makes the camera look at a specified target position.
| camera | The camera to look at the target. |
| target | The target position to look at. |
|
static |
Moves the camera towards a target position at a specified speed.
| camera | The camera to move. |
| targetPosition | The target position to move towards. |
| speed | The speed of the movement. |
|
static |
Performs a raycast from the center of the camera's viewport.
| camera | The camera to perform the raycast from. |
| maxDistance | The maximum distance the ray should check for collisions. |
| layerMask | The layers to include in the raycast. |
|
static |
Rotates the camera towards a target rotation at a specified speed.
| camera | The camera to rotate. |
| targetRotation | The target rotation to rotate towards. |
| speed | The speed of the rotation. |
|
static |
Sets the camera's background color.
| camera | The camera whose background color is to be set. |
| color | The color to set as the background. |
|
static |
Sets the camera's position to a specific value.
| camera | The camera to set the position for. |
| position | The position to set for the camera. |
|
static |
Sets the camera's render target to a specific RenderTexture.
| camera | The camera to set the render target for. |
| renderTexture | The RenderTexture to use as the render target. |
|
static |
Sets the camera's rotation to a specific value.
| camera | The camera to set the rotation for. |
| rotation | The rotation to set for the camera. |
|
static |
Shakes the camera screen by applying random offsets to its position.
| camera | The camera to shake. |
| magnitude | The magnitude of the shake (larger values produce a stronger shake). |
| duration | How long the shake will last, in seconds. |
References coroutineRunner, and ShakeScreenCoroutine().
|
staticprivate |
Referenced by ShakeScreen().
|
static |
Zooms in the camera by reducing its field of view.
| camera | The camera to zoom in. |
| amount | The amount to zoom in, reducing the field of view. |
|
static |
Zooms out the camera by increasing its field of view.
| camera | The camera to zoom out. |
| amount | The amount to zoom out, increasing the field of view. |
|
staticprivate |
Referenced by FadeIn(), FadeOut(), Initialize(), and ShakeScreen().