void DisplayFloatingText(string text, Color color) { Transform floatingTextObject = _floatingTextSfx.GetNext(); FloatingText floatingText = floatingTextObject.GetComponentInChildren <FloatingText>(); if (floatingText != null) { floatingText.Appear(transform, text, color); } }