MLMicrophone
7/14/25About 1 min
MLMicrophone
Info
MLMicrophone inherits from [Component](/docs/create/lua/API/Component/index.html)
API for MLMicrophone component. MLMicrophone allows to create a live audio binding between Massive Loop MLPlayers audio and AudioSources through MLSpeaker component. Basically, a Microphone and Speaker setup for players. A single Microphone can handle input from multiple players and pipe it to multiple speakers.
Members
Properties
| Name | Description |
|---|---|
MLMicrophone.Active | Is microphone active? |
Methods
| Name | Description |
|---|---|
MLMicrophone.AddSpeaker(newSpeaker) | Bind a new speaker to the microphone. Wont effect anything if the speaker is already bound. |
MLMicrophone.GetSpeakers() | Returns an array of currently bound Speakers. |
MLMicrophone.RemoveSpeaker(speaker) | Remove a currently bound speaker. |
Inherited Members
Inherited Properties
| Name | Description |
|---|---|
MLMicrophone.gameObject | The game object this component is attached to. A component is always attached to a game object. |
MLMicrophone.tag | The tag of this game object. |
MLMicrophone.transform | The Transform attached to this GameObject. |
MLMicrophone.hideFlags | Should the object be hidden, saved with the Scene or modifiable by the user? |
MLMicrophone.name | The name of the object. |
Inherited Methods
| Name | Description |
|---|---|
MLMicrophone.BroadcastMessage(methodName, parameter=nil) | Calls the method named methodName on every Lua Script in this game object or any of its children. |
MLMicrophone.CompareTag(tag) | Is this game object tagged with tag ? |
MLMicrophone.GetAllLuaScripts() | Returns an array of all Lua scripts that attached to the game object. |
MLMicrophone.GetComponent(type) | Returns the component of Type type if the game object has one attached, nil if it doesn't. |
MLMicrophone.GetComponentInChildren(t) | Returns the component of Type type in the GameObject or any of its children using depth first search. |
MLMicrophone.GetComponentInParent(t) | Returns the component of Type type in the GameObject or any of its parents. |
MLMicrophone.GetComponents(type) | Returns all components of Type type in the GameObject. |
MLMicrophone.GetComponentsInChildren(t) | Returns all components of Type type in the GameObject or any of its children. |
MLMicrophone.GetComponentsInParent(t) | Returns all components of Type type in the GameObject or any of its parents. |
MLMicrophone.SendMessage(methodName, value=nil) | Calls the method named methodName on every Lua Script in this game object. |
MLMicrophone.SendMessageUpwards(methodName, value=nil) | Calls the method named methodName on every LuaScript in this game object and on every ancestor of the behaviour. |
MLMicrophone.TryGetComponent(type) | Gets the component of the specified type, if it exists. |
MLMicrophone.GetInstanceID() | Returns the instance id of the object. |

