using Steamworks; using UFS2.Gameplay; using UnityEngine; public class FishLabelMarkerAttacher : MonoBehaviour { [SerializeField] private FishLabelMarker fishLabelMarker_template; private void FishSpawner_OnSpawnFish(FishEntity fishEntity, int fishIndex) { if (SteamApps.GetCurrentBetaName(out var pchName, 100)) { pchName = pchName.ToLower(); if (pchName.Contains("test")) { AttachLabel(fishEntity); } } } private void OnEnable() { FishSpawner.OnSpawnFish += FishSpawner_OnSpawnFish; } private void OnDisable() { FishSpawner.OnSpawnFish -= FishSpawner_OnSpawnFish; } private void AttachLabel(FishEntity fishEntity) { Object.Instantiate(fishLabelMarker_template, fishEntity.transform.position, Quaternion.identity, fishEntity.transform); } }