Eye of the Nile Docs
Everything you need to know to get started!
Loading...
Searching...
No Matches
FadeDistantObject Class Reference

Detailed Description

This script controls the transparency of objects that are distant to the player. This script affects the sprite renderer of the object that it is attached to.

Documentation updated 4/13/2025

Author
Alexander Art

Protected Attributes

SpriteRenderer spriteRenderer
 Reference to the SpriteRenderer to make transparent.
 
LayerMask playerLayer
 Objects on this layer are detected as the player.
 
float opaqueDistance = 8f
 The distance at which you want the object to be fully opaque.
 
float transparentDistance = 10f
 The distance at which you want the object to be fully transparent.
 

Private Member Functions

void Awake ()
 
void Update ()
 

Member Function Documentation

◆ Awake()

void FadeDistantObject.Awake ( )
private

◆ Update()

void FadeDistantObject.Update ( )
private

Member Data Documentation

◆ opaqueDistance

float FadeDistantObject.opaqueDistance = 8f
protected

The distance at which you want the object to be fully opaque.

◆ playerLayer

LayerMask FadeDistantObject.playerLayer
protected

Objects on this layer are detected as the player.

◆ spriteRenderer

SpriteRenderer FadeDistantObject.spriteRenderer
protected

Reference to the SpriteRenderer to make transparent.

◆ transparentDistance

float FadeDistantObject.transparentDistance = 10f
protected

The distance at which you want the object to be fully transparent.


The documentation for this class was generated from the following file: