MP Kill Feed

Description

Displays kill data typically seen in multiplayer games. It is used in conjunction with MPKillInfoContainer, which is attached to a prefab. The MPKillFeed should be attached to a UI canvas in the GAME scene.

Inspector Fields

Mp Kill Feed Scroll Rect

Type: ScrollRect

Description: Specifies the UI ScrollRect that will be controlled by the MPKillFeed. The ScrollRect is responsible for scrolling the kill feed content.

Note: This variable should be attached to the appropriate UI ScrollRect component in the scene.

Mp Kill Info Content

Type: GameObject

Description: Specifies the UI GameObject that will serve as the parent for the MPKillInfoPrefabs that are spawned. The spawned kill info prefabs will be placed as children of this GameObject.

Note: This variable should be attached to the appropriate UI GameObject in the scene.

Mp Kill Info Prefab

Type: GameObject

Description: Specifies the prefab GameObject that contains the MPKillInfoContainer component attached to it. This prefab is used to instantiate kill info elements in the kill feed.

Note: This variable should be assigned the appropriate prefab in the Unity Editor.

Kill Info Life Time

Type: float

Description: Specifies the duration in seconds for which the kill feed will display the kill data. After this duration, the kill info elements will be removed from the feed.

Default Value: 2f

Weapon Icon Data

Type: List of WeaponIconData

Description: Contains a list of WeaponIconData objects representing the data used for the kill feed. Each WeaponIconData object represents a weapon with its associated icon, scale, and rotation.

Note: This list should be populated with the necessary weapon icon data in the Unity Editor.

Nested Class: WeaponIconData

Description

Represents the data for a weapon icon in the kill feed.

Variables within WeaponIconData

m_WeaponName

Type: string

Description: Specifies the name of the weapon associated with the icon.

m_Icon

Type: Sprite

Description: Specifies the icon to be displayed for the weapon.

m_Scale

Type: Vector3

Description: Specifies the scale of the icon. Allows customization of the size of the weapon icon.

m_Rotation

Type: Vector3

Description: Specifies the rotation of the icon. Allows customization of the rotation of the weapon icon.

Default Value: new Vector3(0f, 0f, 0f) (no rotation)

Properties within WeaponIconData

WeaponName

Type: string

Description: Retrieves the icon sprite associated with the weapon.

Scale

Type: Vector3

Description: Retrieves the scale of the icon.

Rotation

Type: Vector3

Description: Retrieves the rotation of the icon.

What are your feelings
Updated on August 14, 2023