Skip to main content
Version: 2.x

Class OdinTerrainFilterComponent

Custom filter by terrain component for OdinNative.Wrapper.Media.CustomEffect

This class is a effect in the odin audio pipline to mute audio based on location of a GameObject relative to a terrain type in Unity space. Note that the default implementation is Unity specific on a 2D calculation with X, Z and is not useful in all occlusions.

Assembly: cs.temp.dll.dll
Declaration
public class OdinTerrainFilterComponent : OdinCustomEffectUnityComponentBase<TerrainFilterUserData>, IOdinEffect

Inheritance: System.Object -> OdinNative.Unity.Audio.OdinCustomEffectUnityComponentBase<U>

Implements:
OdinNative.Unity.Audio.IOdinEffect

Fields

Emitter

Declaration
public GameObject Emitter

Data

Declaration
public Terrain Data

_UserData

Declaration
protected OdinTerrainFilterComponent.TerrainFilterUserData _UserData

Methods

SetUserData(Vector3, Vector3, TerrainData)

Set delegate userdata for effect callback

Declaration
public virtual void SetUserData(Vector3 objectPosition, Vector3 terrainPosition, TerrainData terrainData)
Parameters
TypeName
Odin.Vector3objectPosition
Odin.Vector3terrainPosition
Odin.TerrainDataterrainData

GetEffectUserData()

Get delegate userdata

Declaration
public override OdinTerrainFilterComponent.TerrainFilterUserData GetEffectUserData()
Returns

OdinNative.Unity.Audio.OdinTerrainFilterComponent.TerrainFilterUserData: effect userdata### CustomEffectCallback(OdinArrayf, ref bool, TerrainFilterUserData)

Declaration
public override void CustomEffectCallback(OdinArrayf audio, ref bool isSilent, OdinTerrainFilterComponent.TerrainFilterUserData userData)
Parameters
TypeName
Odin.OdinArrayfaudio
System.BooleanisSilent
OdinNative.Unity.Audio.OdinTerrainFilterComponent.TerrainFilterUserDatauserData

Implements