Game.Prefabs.ToolUXSoundSettingsData
Assembly:
Namespace: Game.Prefabs
Type: struct
Base: IComponentData, IQueryTypeParameter
Summary:
ToolUXSoundSettingsData is an ECS component (blittable struct) that holds Entity references to sound prefabs used by various tool and UX actions in the game (e.g., polygon tool actions, bulldoze, networking tools, zoning, camera zoom, tutorials, etc.). Each field is an Entity that should point to a sound prefab or sound-emitting entity. The component can be attached to an entity to centralize tool-related sound settings for systems that need to play or query these sounds.
Fields
-
public Entity m_PolygonToolSelectPointSound
Reference to the sound played when selecting a point with a polygon tool. -
public Entity m_PolygonToolDropPointSound
Reference to the sound played when dropping a point with a polygon tool. -
public Entity m_PolygonToolRemovePointSound
Reference to the sound played when removing a point in polygon editing. -
public Entity m_PolygonToolDeleteAreaSound
Sound played when deleting an area with the polygon tool. -
public Entity m_PolygonToolFinishAreaSound
Sound played when finishing a polygon area. -
public Entity m_BulldozeSound
Sound used for generic bulldoze actions. -
public Entity m_PropPlantBulldozeSound
Sound used when demolishing props/plants. -
public Entity m_TerraformSound
Sound used for terraforming actions. -
public Entity m_PlaceBuildingSound
Sound played when placing a building. -
public Entity m_RelocateBuildingSound
Sound played when relocating a building. -
public Entity m_PlaceUpgradeSound
Sound played when placing an upgrade on a building. -
public Entity m_PlacePropSound
Sound played when placing a prop. -
public Entity m_PlaceBuildingFailSound
Sound played when building placement fails. -
public Entity m_ZoningFillSound
Sound for zoning fill (painting zones). -
public Entity m_ZoningRemoveFillSound
Sound played when removing zoning fill. -
public Entity m_ZoningStartPaintSound
Sound for the start of zoning paint action. -
public Entity m_ZoningEndPaintSound
Sound for the end of zoning paint action. -
public Entity m_ZoningStartRemovePaintSound
Sound for starting zoning removal. -
public Entity m_ZoningEndRemovePaintSound
Sound for ending zoning removal. -
public Entity m_ZoningMarqueeStartSound
Sound when starting a zoning marquee selection. -
public Entity m_ZoningMarqueeEndSound
Sound when ending a zoning marquee selection. -
public Entity m_ZoningMarqueeClearStartSound
Sound when starting to clear a zoning marquee. -
public Entity m_ZoningMarqueeClearEndSound
Sound when finishing clearing a zoning marquee. -
public Entity m_SelectEntitySound
Sound played when selecting an entity. -
public Entity m_SnapSound
Sound for snapping actions (e.g., grid or alignment snaps). -
public Entity m_NetExpandSound
Sound for expanding network segments. -
public Entity m_NetStartSound
Sound for starting network construction. -
public Entity m_NetNodeSound
Sound related to network node placement. -
public Entity m_NetBuildSound
Sound for building network segments. -
public Entity m_NetCancelSound
Sound played when canceling network construction. -
public Entity m_NetElevationUpSound
Sound for raising network elevation. -
public Entity m_NetElevationDownSound
Sound for lowering network elevation. -
public Entity m_TransportLineCompleteSound
Sound when a transport line creation is completed. -
public Entity m_TransportLineStartSound
Sound at the start of transport line creation. -
public Entity m_TransportLineBuildSound
Sound for building parts of a transport line. -
public Entity m_TransportLineRemoveSound
Sound for removing a transport line. -
public Entity m_AreaMarqueeStartSound
Sound when starting an area marquee action. -
public Entity m_AreaMarqueeEndSound
Sound when ending an area marquee action. -
public Entity m_AreaMarqueeClearStartSound
Sound when starting to clear an area marquee. -
public Entity m_AreaMarqueeClearEndSound
Sound when finishing clearing an area marquee. -
public Entity m_TutorialStartedSound
Sound played when a tutorial starts. -
public Entity m_TutorialCompletedSound
Sound played when a tutorial completes. -
public Entity m_CameraZoomInSound
Sound for camera zoom-in action. -
public Entity m_CameraZoomOutSound
Sound for camera zoom-out action. -
public Entity m_DeletetEntitySound
Sound used when deleting an entity (note: field name contains a likely typo "Deletet" — probably intended "DeleteEntitySound").
Properties
- None. (All data are public fields on this struct.)
Constructors
- Implicit default constructor (value type).
As a struct, ToolUXSoundSettingsData has the implicit parameterless constructor that initializes all Entity fields to default(Entity) (typically Entity.Null).
Methods
- None. This type is a plain data container and does not define methods.
Usage Example
// Example: creating and assigning this component to an entity with EntityManager
var soundSettings = new ToolUXSoundSettingsData
{
m_PolygonToolSelectPointSound = polygonSelectSoundEntity,
m_PolygonToolDropPointSound = polygonDropSoundEntity,
m_BulldozeSound = bulldozeSoundEntity,
m_PlaceBuildingSound = placeBuildingSoundEntity,
m_CameraZoomInSound = cameraZoomInSoundEntity,
m_CameraZoomOutSound = cameraZoomOutSoundEntity,
// ... assign other fields as needed
};
// entityManager is a Unity.Entities.EntityManager and targetEntity is the entity to hold the settings
entityManager.AddComponentData(targetEntity, soundSettings);
// Systems can then read these Entity references to instantiate or play the specified sounds.
{{ Notes: - This component simply stores Entity references — actual playback or instantiation of sounds should be handled by appropriate audio/sound systems that resolve these Entities to prefab/audio sources. - The field m_DeletetEntitySound appears to have a typo; verify its intended name in the original codebase if you plan to access it by name in reflection or serialization. - Because this is an IComponentData, keep it small and blittable; storing only Entity references is appropriate for ECS usage. }}