Skip to content

Commit ba7f1b8

Browse files
committed
feat: add original name particle and clip name
1 parent f53efaa commit ba7f1b8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Assets/JCSUnity/Scripts/Util/JCS_Audio.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public static AudioSource PlayClipAtPoint(
8181
if (clip == null)
8282
return null;
8383

84-
var gameObject = new GameObject("One shot audio");
84+
var gameObject = new GameObject($"One shot audio ({clip.name})");
8585
gameObject.transform.position = position;
8686
var audioSource = gameObject.AddComponent<AudioSource>();
8787
audioSource.clip = clip;

Assets/JCSUnity/Scripts/Util/JCS_Util.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ public static ParticleSystem PlayParticleAtPoint(ParticleSystem ps, Vector3 posi
11801180
return null;
11811181

11821182
ParticleSystem newPS = MonoBehaviour.Instantiate(ps);
1183-
newPS.gameObject.name = "One shot particle";
1183+
newPS.gameObject.name = $"One shot particle ({ps.name})";
11841184
newPS.transform.position = position;
11851185
newPS.Play();
11861186

0 commit comments

Comments
 (0)