Class SceneSiteEmitters
A scene's baked emitters (Emitters: chimneys, fires, forges, lanterns), offered to the client's site lights and hearth smoke while the scene is loaded.
[DisallowMultipleComponent]
[RequireComponent(typeof(ClientOnlyObject))]
public sealed class SceneSiteEmitters : MonoBehaviour
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourSceneSiteEmitters
- Inherited Members
-
MonoBehaviour.IsInvoking()MonoBehaviour.CancelInvoke()MonoBehaviour.StopCoroutine(Coroutine)MonoBehaviour.StopAllCoroutines()MonoBehaviour.destroyCancellationTokenMonoBehaviour.useGUILayoutMonoBehaviour.didStartMonoBehaviour.didAwakeMonoBehaviour.runInEditModeBehaviour.enabledBehaviour.isActiveAndEnabledComponent.GetComponent<T>()Component.TryGetComponent<T>(out T)Component.GetComponentInChildren<T>()Component.GetComponentsInChildren<T>()Component.GetComponentInParent<T>()Component.GetComponentsInParent<T>()Component.GetComponents<T>()Component.GetComponentIndex()Component.CompareTag(TagHandle)Component.transformComponent.transformHandleComponent.gameObjectComponent.tagObject.GetEntityId()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.FindObjectsByType<T>()Object.FindObjectsByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Remarks
Client only: the object carries ClientOnlyObject, so server builds strip it.
Fields
ObjectName
public const string ObjectName = "Site Emitters"
Field Value
Points
[Tooltip("The scene's points of interest, whose Emitters this offers.")]
public ScenePointsOfInterest Points
Field Value
Properties
Active
The enabled scenes' emitter sets.
public static IReadOnlyList<SceneSiteEmitters> Active { get; }
Property Value
Emitters
This scene's emitters (never null).
public IReadOnlyList<SceneEmitter> Emitters { get; }
Property Value
Version
Bumped whenever a set comes or goes, so a reader can cache what it found.
public static int Version { get; }
Property Value
Methods
AddLights(Object, IReadOnlyList<SceneEmitter>)
Offers an owner's lights to Near(Vector3, float, Func<SceneEmitterKind, bool>, int, List<SceneEmitter>) (replacing any it offered before).
public static void AddLights(Object owner, IReadOnlyList<SceneEmitter> emitters)
Parameters
ownerObjectemittersIReadOnlyList<SceneEmitter>
InRoom(Vector3)
Whether a point is inside any enabled scene's room (a building's inside: its walls and roof over it).
public static bool InRoom(Vector3 at)
Parameters
atVector3
Returns
Near(Vector3, float, Func<SceneEmitterKind, bool>, int, List<SceneEmitter>)
Every enabled scene's emitters of some kinds within a distance of a point, nearest first, at most max.
public static void Near(Vector3 at, float reach, Func<SceneEmitterKind, bool> kinds, int max, List<SceneEmitter> into)
Parameters
atVector3reachfloatkindsFunc<SceneEmitterKind, bool>maxintintoList<SceneEmitter>
Remarks
In play, read through each set's cell index (SceneSiteEmitters.EmitterIndex): only the cells within reach are looked at, and each emitter in them is measured exactly as before, so the result is the same set. Equal distances are ordered by set and emitter, where the old sort left them in no particular order.
NearRooms(Vector3, float, int, List<SceneRoom>)
Every enabled scene's rooms whose middles are within a distance of a point, nearest first, at most max.
public static void NearRooms(Vector3 at, float reach, int max, List<SceneRoom> into)
Parameters
RemoveLights(Object)
Withdraws an owner's lights.
public static void RemoveLights(Object owner)
Parameters
ownerObject
SiteAt(Vector3, float, out PointOfInterestKindInfo)
The point of interest whose ground covers a place (within its radius and margin more,
horizontally), the nearest centre where several do; false outside every one. Sites on the sea or lake floor are
left out: their ground is under the water.
public static bool SiteAt(Vector3 at, float margin, out PointOfInterestKindInfo site)
Parameters
atVector3marginfloatsitePointOfInterestKindInfo